Jump to content
Sign in to follow this  
ramon_dexter

Changing hostility of AI units

Recommended Posts

Hi, umm, I need to help with something for my mod.

I need to have multiple factions in my mod. On of these factions would be OPFOR based bandit faction. I need to have it OPFOR, so these units will be enemy for the player by default.

But, in ceratain situations, I need to make them non-hostile (example: The player is sent to bandit base to rescue captives. I don't need the bandits to shoot player on sight - I want to make some negotiations, so I need to make these bandits friendly under some condition.). How can I make OPFOR units friendly under a condition?

I was looking at community.wiki and found out this:


playerChar setCaptive true; 

I will place this on a trigger, which will be placed on the bandit base area.

Then, if the negotiation fails, I will just change playerChar setCaptive false and the bandits will be hostile.

Will it work, or I have to build more complicated code?

Share this post


Link to post
Share on other sites

I hope so. But in another thred, I read that there might be a problem, like when the PFOR units saw me before this is triggered, they will stay hostile...Well, I will see when I try it.

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  

×