Jump to content
Sign in to follow this  
fawlty

[Solved] Trigger multiple squads

Recommended Posts

The there a way I can get this result in one line, used in a trigger

p0_1 etc. is the ai squad leaders variable name

 

[p0_1, 1500] execVM "fn_taskRush.sqf"; 
[p0_2, 1500] execVM "fn_taskRush.sqf";
[p0_3, 1500] execVM "fn_taskRush.sqf";

 

This of course doesn't work, but you can see what I'm after

[p0_1, p0_2, p0_3, 1500] execVM "fn_taskRush.sqf";

 

 

Share this post


Link to post
Share on other sites
34 minutes ago, fawlty said:

This of course doesn't work

 

No reason why it shouldn't. [*EDIT* - of course, you mean your second example.] Regardless, you could use forEach:

{[_x, 1500] execVM "fn_taskRush.sqf"} forEach [p0_1, p0_2, p0_3];

But again, this is just a fancy way of writing what you started with above.

  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks Harzach

After a bunch of trial and error I actually figured it out for myself, kind of surprised myself.

 

{[_x, 1500] execVM "fn_taskRush.sqf"} forEach [p0_1,p0_2];         as you provided for me.

 

Thanks again

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  

×