Jump to content
Sign in to follow this  
jakkob4682

Suppressing Fire Question

Recommended Posts

I'm trying to make a simple function that uses nearTargets and suppressFor for a QRF group. My question is can you use sleep within a "called" function? I.E.

_handle =

{

//createGroup and createUnit code

//use nearTargets to define threats and targets code

{

_x commandTarget _tgt

_x suppressFor 10;

}forEach units _group;

sleep 5;

};

I hope that makes sense, can't seem to get the formatting down using text editor in the forums.

Share this post


Link to post
Share on other sites

You have to use spawn for that to work, as call does not work with functions involving sleep. So something along the lines of "[] spawn myFunctionName" without the "". Also I suggest you use "handle" instead of "_handle" if you want to call the function outside of the current script.

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  

×