Leave Region, change teams.
Posted: Sun Nov 08, 2009 12:47 pm
Hi,
I'm working on the same map I was some months ago,
Here is what I need to happen:
CIS kill the clones, the clones die and go to jail (this part was already asked about and Zerted helped me with it)
When they go to jail they become team 3 and are friends with all other teams.
When they leave the cell region, I want them to revert to team 1.
My current function is:
Nothing appears to happen. I will update this post with the error log shortly.
EDIT: Error log says nothing related to the function.
I'm working on the same map I was some months ago,
Here is what I need to happen:
CIS kill the clones, the clones die and go to jail (this part was already asked about and Zerted helped me with it)
When they go to jail they become team 3 and are friends with all other teams.
When they leave the cell region, I want them to revert to team 1.
My current function is:
Code: Select all
OnLeaveRegion(
function(region,character)
local prisoner = GetCharacterUnit(character)
SetProperty(prisoner, "PercievedTeam", 1)
SetProperty(prisoner, "Team", 1)
end,
"jailer"
)EDIT: Error log says nothing related to the function.