Jump to content
Sign in to follow this  
splatsh

Code split, not work, why? help

Recommended Posts

Ok, I have this in one other thread, but that thread is about eject, and now my eject are working.

But its not working as I would like it to.

Check this.

Working

{unassignvehicle _x;} foreach units _leader;
{_x action ["EJECT", _vcl_new];} foreach units _leader;

NOT working

{
unassignvehicle _x;
_x action ["EJECT", _vcl_new];
sleep 0.5;
} foreach units _leader;

I cant get this second code to work. Why cant I that?

This code seems to work for others when using in it.

But mine is not working, I cant get this sleep to work.

Please help.

Share this post


Link to post
Share on other sites

try with sleep 0.5; deleted

Share this post


Link to post
Share on other sites

Are you using sqs (exec) or sqf (execVM) to execute the script?

Share this post


Link to post
Share on other sites

There is nothing wrong with the script they get out and if you increase sleep to 5secs you see the difference. If the filetype is SQS it will need to be ~0.5; for it to work.

Share this post


Link to post
Share on other sites

try using "units group _leader;"

I believe, from the wiki, it works based on a unit. But I would go with deriving the units from the group, not from the leader.

Also, post the whole script. Very little can be deduced from this without all the rest of it.

Share this post


Link to post
Share on other sites

do you call the script with execVM or spawn? Make sure you dont start it with exec.

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  

×