Aller au contenu

Photo

How do you change from hostile to neutral?


1 réponse à ce sujet

#1
PavelNovotny

PavelNovotny
  • Members
  • 344 messages
I have a team that starts out as hostile, and I want it to change to neutral after some plot flags have turned true. I don't see team events in the wiki other than the one that occurs when the team is destroyed.

How do you change a team from hostile to neutral?

Thanks!

#2
DavidSims

DavidSims
  • BioWare Employees
  • 196 messages
If the team is in the same area as the player when the plot flags are set, put the following in the action of the plot flag. If it's a different area, check for the plot flag on the PRELOAD_EXIT event, then put the code in there. You could quite easily turn this into a function as well, if you were going to use it in multiple places.



object[] oTeamArray = GetTeam(nTeam);

int nIndex;

for (nIndex = 0; nIndex < GetArraySize(oTeamArray); nIndex++)

{

SetGroupId(oTeamArray[nIndex], GROUP_NEUTRAL);

}