Leave Region, change teams.

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
Tourny
Command Sergeant Major
Command Sergeant Major
Posts: 289
Joined: Sat Sep 27, 2008 5:58 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Crifton
Contact:

Leave Region, change teams.

Post 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.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Leave Region, change teams.

Post by Fiodis »

Try adding ActivateRegion("jailer") after that ending parentheses.
Post Reply