Page 2 of 2
Posted: Thu Jul 31, 2003 12:40 am
by Alcoholic
then if the trigger set a thread, we'd have to make that thread in the script, and it would have to somehow tell another thread that somebody is in it.. more complicated.

Posted: Thu Jul 31, 2003 12:49 am
by nuggets
more complicated? that's the whole point of parm.other
it's using while istouching self, where self is the trigger... the reason u've just replied of if the trigger set a thread, is the way it's working with setthread loading the script
Posted: Thu Jul 31, 2003 7:48 am
by Bilko
I dunno, not much on this make sense to me, but it works. I think it was the parm.other and setaimtarget NULL which sorted it for me.
Bilko.
Posted: Thu Jul 31, 2003 2:57 pm
by bdbodger
parm.other sets the aimtarget to the player that triggers the trigger . The point of istouching is so that he remains the target until he is no longer touching the trigger because he has moved out of the area or has died otherwise when he respawns he will still be the aimtarget unless the aimtarget is reset to something else . One other thing you might do is to set a variable so that if another player enters the area the aimtarget is not reset until the first player dies or leaves . I know you don't need to keep resetting the aimtarget inside the loop but if the player is waiting to be targeted when the loop starts he will them become the aimtarget . The while loop will act like an if statement .
gunaimer:
local.guntarget=parm.other
while (level.gun1_has_target=1)
waitframe
level.gun1_has_target=1
while(local.guntarget istouching self)
$gun1 setaimtarget local.guntarget
.....
.....
}
level.gun1_has_target=0
$gun1 setaimtarget null
end
Posted: Thu Jul 31, 2003 6:10 pm
by nuggets
isalive checks on life, not istouching
Posted: Fri Aug 01, 2003 12:46 pm
by bdbodger
Yes and istouching checks that the player is still in the trigger area so that he is not the aimtarget when he is a spectator