obj problem when changing team
Moderator: Moderators
obj problem when changing team
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.
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:
The local.player != NIL bit is to check whether the player hasn't left the battle (disconnected from server).
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
