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!
How do you change from hostile to neutral?
Débuté par
PavelNovotny
, mars 08 2010 01:02
#1
Posté 08 mars 2010 - 01:02
#2
Posté 08 mars 2010 - 01:39
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);
}
object[] oTeamArray = GetTeam(nTeam);
int nIndex;
for (nIndex = 0; nIndex < GetArraySize(oTeamArray); nIndex++)
{
SetGroupId(oTeamArray[nIndex], GROUP_NEUTRAL);
}





Retour en haut






