Posted by Stealth on February 07, 1998 at 09:01:05:
In Reply to: TeleportThing() Problem posted by Lord of Sith on February 07, 1998 at 08:02:05:
> What Message can I use to detect an enemy (ie Stormtrooper) Entering a sector or entering a surface.I Have mastered Player teleport at random positions but I believe if a player can do it so should an enemy.
actor thing type = 2
if (GetThingType()==2) or
If (FirstThingInSector(sector)==2 ) //actor
NextThingInSector(sector, previous thing ); //previous thing is the one found by FirstThingInSector
PrevThingInSector(sector, previous thing );// previous thing is either FirstThing or Next Thing
for a sector probably use
entered:
and for a surface
crossed:
If you know what the thing is you could count how many are in a sector
GetSectorThingCount(sector,thing);
If you want to track a particular thing to find out what sector it`s in.
GetThingSector(thing);
If your only interested in a couple or a specific thing it would be easier to
thing troop linkid=1
thing troop1 linkid=1
etc..
entered: or crossed:
if (GetSenderId()==1)
{
dosomething
return;
}