Jump to content
Sign in to follow this  
alleycat

execVM question

Recommended Posts

If I run 2 scripts like this

execVM "script1.sqf";
execVM "script2.sqf";

...and there is a sleep delay in script 1, will this delay script2? Or does execVM just start script1, then immediately start the next line?

Share this post


Link to post
Share on other sites

immediately onto the next line. it doesnt wait for the script to finish.

_handle = player execVM "test.sqf";

waitUntil {scriptDone _Handle};

_handle = player execVM "test2.sqf";

this will ensure that test is run before test2

Share this post


Link to post
Share on other sites
immediately onto the next line. it doesnt wait for the script to finish.

_handle = player execVM "test.sqf";

waitUntil {scriptDone _Handle};

_handle = player execVM "test2.sqf";

this will ensure that test is run before test2

or

[] call compile preProcessFileLineNumbers "test.sqf"

Share this post


Link to post
Share on other sites

yea that too... but then you can't have a sleep in test.sqf

Share this post


Link to post
Share on other sites
yea that too... but then you can't have a sleep in test.sqf

Depends on the context it runs from. Directly from the editor? No. Init.sqf? Works just fine.

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  

×