Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Actor Detector
Actor Detector
2005-08-24, 7:08 PM #1
I want to have a COG that will detect when two actors are within a certain radius of each other. How would I go about this?
the idiot is the person who follows the idiot and your not following me your insulting me your following the path of a idiot so that makes you the idiot - LC Tusken
2005-08-24, 7:14 PM #2
Who would be detecting if two actors are within a certain radius of each other? Is it a level cog? Or would a cog that detects the distance between you and a victim be enough?

It's gonna be something like this, probably:
Code:
if(VectorDist(GetThingPos(actor1), GetThingPos(actor2)) < distance)
{
   do_whatever;
}
Return;

Distance can be any numerical value you want it to be(JKU's).

ReT
2005-08-25, 3:41 PM #3
Thank you much.
the idiot is the person who follows the idiot and your not following me your insulting me your following the path of a idiot so that makes you the idiot - LC Tusken

↑ Up to the top!