Jump to content
FrostOX9

Adjusting Faction Relations During Mission

Recommended Posts

Hey everyone.

I've been trying to find a method to adjust a faction's relations during a mission. Currently, the player is currently a member of the Guerrilla faction. For the purposes of the mission, he needs to be friendly with OPFOR until a specific point in the mission, at which time OPFOR units will begin to react hostilely to the members of the Guerrilla faction. I've checked around on the forums, but haven't seen something that's worked for me yet. I've tried a couple of things so far:

1) Creating a trigger to execute a script that adjusts faction relations via "Resistance setFriend [EAST, 0];". Haven't had much success with that method. The OPFOR AI won't change their demeanor towards the Guerrilla faction and won't fire upon them.

2) Tried setting the player's side to OPFOR, then make them join the Guerrilla side at a certain triggered point. Similar to the above method, the OPFOR AI won't engage the player or the Guerrilla faction members. I'm not sure if this is due to an AI issue or if it's operator-error on my part.

Any input would be much appreciated. Thanks!

Share this post


Link to post
Share on other sites

You tried Resistance setFriend [EAST, 0] but did you try EAST setFriend [Resistance, 0]

Share this post


Link to post
Share on other sites
You tried Resistance setFriend [EAST, 0] but did you try EAST setFriend [Resistance, 0]

Yup, I've given both of those a shot and it seems to work, but only on units that have not been placed yet. Any unit that existed before the trigger went off still won't fire on any Resistance members. Any that are placed afterwards (via MCC) will properly engage Resistance members.

Share this post


Link to post
Share on other sites

hav'nt tested it but, how about

{resistance setFriend [east, 0]} forEach allUnits;
{east setFriend [resistance, 0]} forEach allUnits;

if you want to just make you or a group an enemy by just changing the faction there is an example at the bottom of the side relations page in the wiki https://community.bistudio.com/wiki/Side_relations

Edited by Nimrod_Z

Share this post


Link to post
Share on other sites

can you tell me how you changed the player side with a trigger?

Share this post


Link to post
Share on other sites
On 31/10/2013 at 7:47 PM, nimrod_z said:

hav'nt tested it but, how about

 


{resistance setFriend [east, 0]} forEach allUnits;
{east setFriend [resistance, 0]} forEach allUnits;

 

 

That doesn't make sense because setFriend applies to sides. This command must be run on server:

if (isServer) then {Independent setFriend [EAST, 0]; EAST setFriend [Independent, 0]};

or in a trigger, make it "server only".

 

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

×