Jump to content

Recommended Posts

Guys,

Looking to have a trigger that removes a backpack and replaces it with a parachute for any unit that enters the trigger area. I currently have it working correctly, but it will only, remove and add the backpack for 1 unit at a time. So if I enter the trigger area with a team of 6 Ai, only the first unit entering will have the backpack replaced. If I leave the trigger area and send 1 Ai back into the area it works again for that 1 Ai. What I'd like to to do is remove the backpack and add the parachute to every unit in the area at the same time, regardless of how many are inside. (it wont be more than 6 at a time)

 

5x5 trigger placed

activates blufor - present

repeatable

On Act

{removeBackpack _x} forEach thisList; {_x addBackpack "B_Parachute"} forEach thisList;

 

Any ideas suggestions greatly appreciated

Smudge

Share this post


Link to post
Share on other sites

condition:

this && isNil "toggleTrg"
on act:
{_x addBackpack "B_parachute"} count (thisList select {backPack _x != "B_parachute"}); toggleTrg = TRUE;
on deact:
0 = [] spawn {sleep 1; toggleTrg = nil}

 

or treat the whole group instead of each units:
same trigger than yours and:
{_x addBackpack "B_parachute"} count (units (thisList #0));

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, pierremgi said:

condition:

this && isNil "toggleTrg"
on act:
{_x addBackpack "B_parachute"} count (thisList select {backPack _x != "B_parachute"}); toggleTrg = TRUE;
on deact:
0 = [] spawn {sleep 1; toggleTrg = nil}

 

or treat the whole group instead of each units:
same trigger than yours and:
{_x addBackpack "B_parachute"} count (units (thisList #0));

Awesome man thx for your help

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

×