Jump to content
Sign in to follow this  
magicpanda

Unit Morale/Surrender

Recommended Posts

I've seen the enemy flee in game but I was wondering if it's possible to trigger it in the editor?

eg: A Large fortified enemy position/town and right in the middle is a commander/officer type unit that holds the key to the enemy morale. Once he is dead by sniper shot to the head they all start surrendering/fleeing.

I'm thinking it will be an !alive trigger but I'm not sure how to apply it to the entire enemy morale which could be a hundred or so units in the town?

Share this post


Link to post
Share on other sites

I do not think you can use the surrender function as that requires conventional overwhelming odds / losses on the affected side to cause surrender I think.

You could do it by putting a trigger over the Officer target and with a condition to detect if still alive, if not then the trigger fires. This trigger is synced to move waypoints for the garrison units which cause them to move away from the base.

Not sure how well it will work but a possible solution. You might need to do a search on the surrender module/function otherwise.

Share this post


Link to post
Share on other sites
I'm thinking it will be an !alive trigger but I'm not sure how to apply it to the entire enemy morale which could be a hundred or so units in the town?

_this allowFleeing 1

Apply to group leader to control group courage. 0 means fearless, 1 means always fleeing and (if surrender mod is placed) surrendering. Alternatively use unit names instead of _this (which would probably require a SQF).

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  

×