Taurus 20 Posted May 16, 2007 tried the wiki example<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _i = 0; waitUntil {_i = _i + 1; _i >= 100}; Returns: GENERIC ERROR blabla... i access the .sqf with apa = [someUnit] call compile preprocessFile "wontWork.sqf"; also <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _unit = _this; waitUntil{alive _unit}; Wont work either. I imagined the "waitUntil" to check alive _unit == false, try(wait) again... alive _unit == true, WOOT! and then exec the rest of teh script... using a .sqs instead <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">@alive _unit does halt the code Share this post Link to post Share on other sites
suma 8 Posted May 16, 2007 tried the wiki example<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_i = 0; waitUntil {_i = _i + 1; _i >= 100}; i access the .sqf with apa = [someUnit] call compile preprocessFile "wontWork.sqf"; This is wrong. waitUntil works only in a script (asynchronous execution). You need to use not call, which is synchronous, but spawn or execVM. Share this post Link to post Share on other sites
Taurus 20 Posted May 16, 2007 This is VERY comforting to know that the developers looks into this forum but, mr Suma http://community.bistudio.com/wiki/waitUntil Description: Suspend execution of function or SQF based script until condition is satisfied. What am I missing? I'll go for spawn then, as execVM should not be used on scripts that will be executed many times(as far as I've read on this forum) Share this post Link to post Share on other sites
t_d 47 Posted May 16, 2007 afaik you can also use call, but not out of a sqs script. So calling a sqf containing waitUntil or sleep out of a sqf should not cause an error. Share this post Link to post Share on other sites