Jump to content
Sign in to follow this  
avibird 1

Clarification between using editor triggers vs SQF triggers for !alive condation!

Recommended Posts

When using a trigger and putting this in the

activation - none once

condation - !alive unit 1; !alive unit 2 ect....

on act - hint "INTELL REPORTS: All UNITS HAVE BEEN KILLED "; deleteVehicle unit 1; deleteVehicle unit 2;

works fine with editor placed units however I am using SQF to spawn all the units but the simple editor place trigger will not work on the units that are spawned into the mission.

Am I doing something wrong or do I need to set the condations and the delete of the units using the SQF for the units spawned by the SQF. I can get it to work in the SQF just not using the editor trigger setup.

Share this post


Link to post
Share on other sites

How are you spawning the units, they may need naming or have the name stored in a variable so they can be used outside the script.

Share this post


Link to post
Share on other sites

That's why!!! I have two FOB's that can be called in by the SL. The FOB's comes with a 15 unit defence group that gets spawn when the FOB are build. In the FOB's you can recruit different unit groups all work fine with the SQF/or editor triggers but the defence group is part of the FOB and uses the same variable as the FOB. The defence group has it's own name but the issue is the variable name. Thanks I was over looking that(: The FOB's can be decommissioned and recalled after 30 minutes and the defence group will respawn back with the new FOB's. I need to check if one of the units are still on the map will that F up things later in the mission. This is a whole island domination type mission. Thanks Avibird.

Share this post


Link to post
Share on other sites

if they're in a group then it should be possible to just check if the group is alive or dead

{alive _x} count units grpname == 0

Share this post


Link to post
Share on other sites

using the a editor trigger ? and can I delete the dead bodies like this.

activation - none once

condation - {alive _x} count units defencehq2 == 0

on act - hint "INTELL REPORTS: All UNITS HAVE BEEN KILLED "; deleteVehicle unit 1; deleteVehicle unit 2;

---------- Post added at 16:15 ---------- Previous post was at 15:48 ----------

got the trigger to work for hint but can't get the bodies to delete.

I TRYED THIS {alive _x} count units defencehq2== 0; {deleteVehicle _x} forEach (units defencehq2);

AND THIS {alive _x} count units defencehq2== 0; deleteVehicle BAFHQ1;deleteVehicle BAFHQ2;deleteVehicle BAFHQ3;deleteVehicle BAFHQ4;deleteVehicle BAFHQ5;deleteVehicle BAFHQ6;deleteVehicle BAFHQ7;deleteVehicle BAFHQ8;deleteVehicle BAFHQ9;deleteVehicle BAFHQ10;deleteVehicle BAFHQ11;deleteVehicle BAFHQ12;deleteVehicle BAFHQ13;deleteVehicle BAFHQ14;deleteVehicle BAFHQ15;

Can this be done? What code should I try next !

Share this post


Link to post
Share on other sites

{deletevehicle vehicle _x ;deleteVehicle _x; } forEach units defencehq2

Share this post


Link to post
Share on other sites

hey F2K I use the code above but it only deletes one of the 15 units in that group!!

Edited by AVIBIRD 1

Share this post


Link to post
Share on other sites

What is the group made up of exactly?

I did a test in the editor using a group of two vehicles and several units, both in and out of the vehicle and when all units were killed using the above code all vehicles and dead units both units and vehicles were removed.

Are you sure they are really in a group?

Edited by F2k Sel

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  

×