Jump to content
Sign in to follow this  
Medicare

AI surrender when down to last few units

Recommended Posts

I'm always reluctant to start new threads, but I have searched hard and not found anything similar to this. So I seek wisdom from the Guru's notworthy.gif

I hate co-ops where the humans playing spend the last 15 minutes of a given mission running around trying to find that last pesky opfor who is lying halfway in a staircase somewhere obscure, so they can finish the mission.

I am looking for a script that makes it so when the enemy is down to their last say.. 3 guys, those ones will surrender and walk out with their hands on their heads to a central location. And when they all get there, the mission is succesfully completed.

I have managed to sort a script that counts the enemy units in play, and I have sorted the surrrender script, I just need to sus the code that will execute that script when there is only 3 enemy left.  Furthermore, I would like it to create the final meeting waypoint when the script is triggered, and send them there.   From my reading, I see that "captured" units don't set off triggers anymore, so I assume this script will also need to know that they have reached their surrender waypoint, so it can trigger the mission end.

Its important to note, that the last 3 units may not all be from the same original group, so I can't limit the script to one group or another.  Not sure if that matters..

All assistance appreciated. smile_o.gif

Edit, I just realised it will be hard for the script to know where best to place the surrender RV waypoint, so perhaps it should simply point to a predefined marker instead.

Share this post


Link to post
Share on other sites

Medi, I've posted in your thread on the ArmA Australia forum. We should be able to sort something out fairly easily.

If you want to check out how others have set it up SNKMAN's Group Link 2+ scripts (see here )have a surrendering script built in but its probably over kill for your needs.

Share this post


Link to post
Share on other sites

How about a trigger that covers the area of interest that is able to count all the East in thisList and initiate the surrender when the count < 4?

*edit*

For the where-to-surrender issue, either use the location of the trigger or arrange a message to be broadcast that tells everyone where the center of surrender will be (and where the prisoners will head for). You could make this dynamic by choosing the location of a random East AI so that the other 2 are the only ones moving. Pop up the info as co-ords.

Share this post


Link to post
Share on other sites

Man, this would be handy..... all those 3AM mission where entire squad is looking for an enemy that has wandered into a rock formation with noclipping smile_o.gif

Share this post


Link to post
Share on other sites

Thanks for all the replies, you guys have given me plenty to go on. I will spend some time reading and testing. I will post back with the solution I end up using.

Cheers,

Medi.

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  

×