Jump to content
Sign in to follow this  
b1sh0p

countSide

Recommended Posts

I did a search for countSide in both the ArmA Mission Editing and Scripting, and in all BI forums, and only came up with 1 match both times, and it didn't help at all.

I'm making a pretty simple search and destroy mission. The goal is to liberate Somato. There is about a platoon's worth of SLA in the town. I want to have the mission end when there are less than 5 left. I figured the best way to do that would be with a east countSide command. But I don't know how to do it.

A secondary objective of the mission is to limit civilian casualties. There are 20 civilians in the town. If more than 10 of them are killed, the mission is supposed to end. Again, I think civilian countside would be the best way to do this. But again, I don't know how.

The Wiki was a little vague on this command. It's example was not very helpful.

Some help would be appreciated.

Share this post


Link to post
Share on other sites

You can do it with 2 triggers for each side like this...

Trigger 1

Set the trigger to "the side you want present". IE civilian present. And make sure they are are all in the trigger radius.

In the OnAct field put:    civilianlist = thislist

Trigger 2

Set the radius to 0 and in the condition field put:

{!alive _x} count cilvilianlist > 10

And set it to end1 or end2, what every you like.

Do the same thing for the other side, but change the civilian referances to that side.

There is another tread in here with the same question and I think Kyle answered it.

Share this post


Link to post
Share on other sites

Thanks Buhbye, that looks like it could work.

Share this post


Link to post
Share on other sites

You don't need two different triggers, just one combining both of those aspects (side present & new condition). Result is:

Activation: SIDE Present

Condition:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{alive _X} count thislist <= 5

Op4 BuhBye's example does work, however it doesn't update if any new units of that side enter the trigger area or if any initially present units leave it (in other words it checks the units that initially started in the trigger area, only those units and no matter where they venture), whereas the above example always checks all (and only) the units currently inside the trigger area. You should decide which method to use depending on whether you want to track those specific units or just check a given area.

Share this post


Link to post
Share on other sites

@ b1sh0p - As a third alternative, the BAS f mission development framework contains a component called Casualties Cap, which is designed to trigger specific endings when a % of casualties are taken by a group, or group of groups (so it might be all the groups in a side, or just selected ones).

You can use this component as many times as you want in a mission - so you could have one one instance tracking the % of civilian casualties (e.g. inflict more than 50% and ending x is triggered), and another tracking the BLUFOR player group(s) (e.g. sustain more than 70% casualties, and ending y is triggered).

Admittedly, this component works on % not finite numbers, but that can be more useful when you are dealing with groups comprised of players - since the challenge becomes proportionate to the number of players.

A link to the BAS f thread is found in my sig. Good luck with your mission!

smile_o.gif

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  

×