Page 1 of 1
obj problem when changing team
Posted: Wed Aug 18, 2004 4:53 pm
by fuhrer
whats the script command for checking whether someone changes team, i have an obj wher eu gotta take some docs somewhere but if u change team u keep a hold of em, i want the docs to drop in the place u was when u changed team. if that can be done.
Posted: Wed Aug 18, 2004 5:27 pm
by jv_map
Yes it can be done, but it's little bit of work (not too much, though). For instance say you have a thread that starts when a player picks up the docs, and the player is 'local.player', then you could do s/th like this:
Code: Select all
local.startteam = local.player.dmteam
while(local.player != NIL && isAlive local.player && local.player.dmteam == local.startteam)
waitframe
// player has changed team or died or disconnected
// add some code to drop the docs here
The local.player != NIL bit is to check whether the player hasn't left the battle (disconnected from server).
Posted: Wed Aug 18, 2004 5:41 pm
by fuhrer
cheers jv thats perfect