Search the Community
Showing results for tags 'execvm init.sqf scripting'.
Found 1 result
-
How many times does my execVM *.sqf run inside init.sqf
ROGER_BALL posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I have always been able to self-teach just about any language I wanted over my life but I have to say, this ARMA3/SQF combination has seriously Kicked.M.A. I venture to wager that I have encountered the simple answer to this question without understanding the cryptic definitions and conventions. I must surrender at this point and just come here to indulge someone's good graces and thank you in advance. Maybe I'm just getting old. 😕 Anyway, my logs show perhaps 2,000 hours or so doing mission designs and I muddle through but this is a brick wall for some reason. Quite simply, I have an init.sqf that contains execVM "respawnMKR_INDEP.sqf"; This sqf contains the following code: while {true} do { _pos = [INDEP_Roger_Ball, 1, 50, 3, 0, 20, 0] call BIS_fnc_findSafePos; "respawn_guerrila" setmarkerpos _pos; sleep 5; }; My question is: Other than the one time that the init.sqf runs, does this code ever run again if I never "call" it or otherwise refer to this .sqf file? My understanding is that it only runs once. May I assume that "while {1}" will never fail and the execVM initiates this "5-sec" loop ? I conclude this from seeing a moving "respawn_guerrila" marker on the map. This blows my simple mind to have a loop in my code. That's something I have avoided in past lives and thus I ask these questions because it seems a waste of resources. Maybe not. If my assumptions are correct, and since the moving respawn position is only used when I die, would it make sense for me to figure out a way to just keep track of the _pos without doing anything until I die and actually need a "safe _pos"? Perhaps there is negligible differences in the two ideas. The BIS function may be small or may be huge - I donno the overhead in this new world I find myself loving - and I really do obsess over ARMA3 and envy the worlds of young, quick and skillful minds. My missions would really take on a different life. But, I digress. Third, even with good parameters feeding this BIS_fnc_findSafePos function, it still puts me into the water/ocean or some other weird location - but I am not asking for that to be addressed here until I exhaust the huge data mine that exists on this topic. I can hold my own with coding electronic interfaces in C+ but this is a whole different world. My hat is off to the many experts I lean on here for ideas and advice. Thanks for your time to comment briefly from your expertise. Thanks.