Jump to content
Sign in to follow this  
stormoffires

Independents flipping alliances mid mission?

Recommended Posts

I have a mission where you are BluFor helping Independents (UN) and half way through the mission the UN will be come corrupt and i need to flip independent to be enemies vs OPFOR and BLUFOR. 

 

somthing like this would work right, just put it in a .sqf and have a trigger run it?

 

WEST setFriend [RESISTANCE, 0];

RESISTANCE setFriend [WEST, 0];

WEST setFriend [EAST, 0];

EAST setFriend [WEST, 0];

RESISTANCE setFriend [EAST, 0];

EAST setFriend [RESISTANCE, 0];

Share this post


Link to post
Share on other sites

No, don't use setFriend halfway through a mission or it will render the units brainless and weird (try it and see).

 

In your case I would set all the groups to indy at the start of the game (setFriend them to friends with blufor in init.sqf or wherever) and have opfor as enemy (but don't have any groups assigned to opfor).

 

Then when you need everyone to hate blufor, move each group over to opfor and then they will fight blufor.

Share this post


Link to post
Share on other sites

The transfer is rather easy tbh:

{

 if side _x isEqualTo independent then {

 

_current = currentWaypoint _x;

_newGroup = createGroup opfor;

_newGroup  copyWaypoints _x;

units _x join _newGroup;

_newGroup set currentWaypoint [_newGroup, _current];

};

} forEach allGroups;

 

Pop that in a trigger and it should do the trick. 

 

If dealing with scripted or spawned independent this will most likely break those scripts but that's where the fun begins. ;) 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×