SantoJ 0 Posted August 8, 2019 i have created this if statement with the hopes it would detect when the player is within 200m of a marker and show a message at the bottom right corner of the screen, however i keep getting an error on mission start regarding a missing bracket in line 1. if(player (getMarkerPos gatoro) < 200) then { _gatoro = ["Gatoro"] spawn BIS_fnc_infoText; }else {}; this script is called through the init.sqf with []execVM Share this post Link to post Share on other sites
beno_83au 1369 Posted August 8, 2019 waitUntil {player distance (getMarkerPos "gatoro") < 200}; //code If your current code is all you're using then it'll run the if statement once at mission start and never again. If you put it in a waitUntil then it'll do just that, wait until the condition is true before executing the code. You will probably want to have a look at this too to see how to use those commands (and others in the future) properly:https://community.bistudio.com/wiki/Category:Scripting_Commands_Arma_3 Share this post Link to post Share on other sites
SantoJ 0 Posted August 8, 2019 waitUntill works perfectly thank you, however its not repeatable... Any idea how id go about making it so? Share this post Link to post Share on other sites
wogz187 1086 Posted August 8, 2019 @SantoJ, Quote waitUntill works perfectly thank you, however its not repeatable... Any idea how id go about making it so? 1) exec the script again at the end of itself (so remove from init) 2) Make a function 3) Make it while {true} with a condition 4) exec it again from somewhere Have fun! Share this post Link to post Share on other sites
pierremgi 4898 Posted August 8, 2019 Repeatable? It's typically a good usage of trigger. 2 Share this post Link to post Share on other sites