Page 1 of 1

Leave Region, change teams.

Posted: Sun Nov 08, 2009 12:47 pm
by Tourny
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:

Code: Select all

OnLeaveRegion(
	function(region,character)
		local prisoner = GetCharacterUnit(character)
		SetProperty(prisoner, "PercievedTeam", 1)
		SetProperty(prisoner, "Team", 1)
	end,
	"jailer"
	)
Nothing appears to happen. I will update this post with the error log shortly.

EDIT: Error log says nothing related to the function.

Re: Leave Region, change teams.

Posted: Sun Nov 08, 2009 3:04 pm
by Fiodis
Try adding ActivateRegion("jailer") after that ending parentheses.