Jump to content
Sign in to follow this  
kocrachon

Sleep not stoping deletion?

Recommended Posts

As of right now I am running a script where it does a playmove and then deletes the ammo crate the soldiers were sent to destroy. The script is called via this method

_bombact = ammo1 addAction ["Destroy Weapons", "destroyammo.sqs"];

and this is the script, and for some reason, it deletes the ammo crate with out sleeping, so the minute I use the addaction, its deleted and the character is performing an playmove to nothing..

_host = _this select 0;
_caller = _this select 1;
_id = _this select 2;

_host removeAction _id;

_caller playMove "ActsPercSnonWnonDnon_carFixing2";

sleep 37;

deleteVehicle _host;

Share this post


Link to post
Share on other sites

in related question, can sleep be used in trigger? so you seperate 2 different scripts from same trigger.

Share this post


Link to post
Share on other sites
in related question, can sleep be used in trigger?

Nope, but you can spawn a new thread with a trigger and use a sleep in that code block.

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  

×