How to get distance between you and target

downloadstuff

Well-Known Member
Joined
Apr 4, 2015
Messages
82
Likes
0
Points
6
5
#1
hey.. i decided to post it because i have been like a whole day trying to calculate the distance between your actor and the targer to get the distance with the formula but then i found out theres an opcode that does it automatically so here it is, just in case someone else needs it :)

0104: actor $PLAYER_ACTOR near_actor [email protected] radius  RANGE_X  RANGE_Y  RANGE_Z sphere  0

so if i want to check if someone is at the distance of 10.0 from me i would do this

Code:
if
 0104: actor $PLAYER_ACTOR near_actor [email protected] radius  10.0  10.0  10.0 sphere  0
then
...
hope it is usefull for someone as it was hard to find for me. xd


where [email protected] is the actor target
 

Opcode.eXe

Well-Known Member
Joined
Feb 18, 2013
Messages
1,278
Likes
27
Points
98
Location
( ͡° ͜ʖ ͡°)
Website
www.youtube.com
10
#2
OP
OP
D

downloadstuff

Well-Known Member
Joined
Apr 4, 2015
Messages
82
Likes
0
Points
6
5
#3
Opcode.eXe link said:
thanks didnt know that one.
 

MrChristmas

Well-Known Member
Joined
Jul 29, 2014
Messages
562
Likes
0
Points
66
#7
Do not learn Cleo, it won't take you anywhere... If you want to start learning, then start from C++, C# or even Turbo C it will take you further and give you more possibilities.

[member=13605]Paul159[/member]
[member=39749]The gay Gamer[/member]
[member=5978]bye[/member]
 

Child_

Well-Known Member
Joined
May 9, 2015
Messages
115
Likes
0
Points
16
10
#8
Thanks for the advice, Perhaps now I would stop fucking my mind and concentrate on C#
 
Top