Page 1 of 1

Checking for an entity of type in a certain radius?

Posted: Fri Mar 25, 2005 4:36 am
by lizardkid
is it possible? like this..

Code: Select all

//radius command

if($entity.model == static/bigbed.tik)
{

// laugh maniacally

}
i need the radius checking command mostly, and i'll be a monkey if i can't figure it out :S

thought a loop, but checking origins? how...

*brain explodes*

Posted: Fri Mar 25, 2005 4:49 am
by Grassy
:D chill dude..
Do you need the bounds of the clip on the object?
Oops forget that, now I know what you are after...

I dont think radius is what you need, you could use a script_object with a setsize and check if any entities matching a model name are touching the script_object for a match though.
Grassy

Posted: Fri Mar 25, 2005 2:59 pm
by Rindog
vector_within

Code: Select all

 if (vector_within $player[local.i].origin $holsterspot.origin 500)
     {
         $player[local.i] holster
     } 
In this example, if the player goes within 500 world units of the holsterspot, they will be forced to holster their weapon.