Jump to content
ilovebeer

Objective complete triggers

Recommended Posts

What is the command in a trigger for a enemy general dies, it completes the objective? also how could i make it if i invade a city when every man in the city is dead the objective is complete?

Share this post


Link to post
Share on other sites

I'd like to know about that too.

To be precise I would like to know how you make a trigger that detects enemy presence in an area and when the enemy is killed the trigger is activated and a text that says "Area Clear", appears.

I don't really need the mission to end or to mess with the objectives in the briefing notebook. I just want to know when I killed everyone in the area. I can end the mission my self when I am done.

Share this post


Link to post
Share on other sites

Hi,

Steps to check whether a specific soldier dies:

(1) In the briefing.html define an objective 1 with the text Kill the general

(2) In the editor place an officer and name this unit thegeneral

(3) Place a trigger near the unit and place in the condition field getdammage thegeneral >= 1; and in the on activation field "1" ObjStatus "Done";

NB the 'alternative spelling' of getdammage with double m is necessary for this to work!

===

For checking whether all enemies are cleared from a certain location place a trigger at a location which is activated by the side that needs to be cleared from there, adjust the size of the trigger to cover the desired area, then set activation to not present, leave the condition field at the default this and place in the on activation field a statement for ticking off the objective in the briefing (see above, adjust the number for the objective as required), then select Effects, select type Text and type in the text Area clear.

The following document is still handy for creating missions Arma, although it was created for OFP:

Ueber Reference Guide

It will provide answers for most of the common questions.

Regards,

Sander

Share this post


Link to post
Share on other sites

i had a command that worked great for units somthing like - ! - alive general. and in ACT "1" objstatus "done" but ists not workin anyone know why?

Share this post


Link to post
Share on other sites
i had a command that worked great for units somthing like - ! - alive general. and in ACT "1" objstatus "done" but ists not workin anyone know why?

Assuming your unit is actually called "general", then the condition syntax would be: !(alive general)

Share this post


Link to post
Share on other sites

ok awesome it is working now, but what do i do for multiple targets? like i have a mission to blow up 4 AA sites, i have in condition !(alive shilka1) but if i wanted shilka2,3,4 in their how would i add it? i tried !(alive shilka1;shilka2;etc but it didnt work.

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">!(alive shilka1) && !(alive shilka2)

and on - I'm being lazy I know

or maybe even

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">({alive _x } count [shilka1, shilka2, shilka3, shilka4]) == 0

edit:

lebson got there first

Share this post


Link to post
Share on other sites

ok great that worked, now one last question, how do i get a trigger to when a town is clear of troops it will say objective complete? say i was playing west and obj was to clear a town out.

Share this post


Link to post
Share on other sites

(1) Make a briefing and define objective 1 (or antoher number) as Clear the town

(2) Place an OFPOR side unit into the town

(3) Place a trigger in the town and set the size so that it covers the built up area, set activation to OPFOR and NOT PRESENT. Leave the condition field at the default this, type the text "1" ObjStatus "Done";. It is optional to have the effects defined, but you could select text and type in for instance The town has been cleared. Well done! as an extra visual indication in case you miss the top left message flashing that the briefing has been updated with the ticked off objective on removing all OPFOR presence from the town.

(4) Place a BLUFOR unit near the town and make it either the player or playable

If clearing the town is the only objective in the mission, you could select for the trigger type End 2. Since using the Endmission cheat is always going to pick Ending number 1, it is good practice to have the end number one defined in the briefing to display a text that rebukes the player for using cheat and use ending types 2 and 3 for mission accomplished or mission failed.

Regards,

Sander

Share this post


Link to post
Share on other sites

I prefer a SeizedBy trigger over the NotPresent type. On a bad day, you won't always find those missing enemy units that might be crawling out of the city in stealth mode or stuck in inaccessible areas.

In fact, I think I'd use two triggers; one SeizedBy and one CountEnemy<8 or so. Whatever is triggered will set a flag which will trigger the ending trigger.

Share this post


Link to post
Share on other sites
On 6/11/2023 at 12:24 AM, Pubg Devil said:

I want to ask how to set trigger when all enemies dies in village and message appear objective complete 

Simply count trigger list with enemy men/vehicles and run your script if no alive found.

There is such trigger in Xeno Domination, where town is finished if alive enemies count<= 5.

If you not find it, I will do it for you.

 

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

×