vova _fox
Member-
Content Count
39 -
Joined
-
Last visited
-
Medals
Community Reputation
0 NeutralAbout vova _fox
-
Rank
Private First Class
-
ahahahaha list=nearestObjects [position player,[], 100]
-
Global/Local variable problem with Dialog
vova _fox replied to Bbartram's topic in ARMA - MISSION EDITING & SCRIPTING
Hi guys, some question. #define CT_TOOLBOX 6 #define CT_CHECKBOXES 7 #define CT_PROGRESS 8 #define CT_STATIC_SKEW 10 #define CT_CONTEXT_MENU 14 #define CT_CONTROLS_GROUP 15 #define CT_XKEYDESC 40 #define CT_XBUTTON 41 #define CT_XLISTBOX 42 #define CT_XSLIDER 43 #define CT_XCOMBO 44 #define CT_ANIMATED_TEXTURE 45 #define CT_OBJECT 80 #define CT_OBJECT_ZOOM 81 #define CT_OBJECT_CONTAINER 82 #define CT_OBJECT_CONT_ANIM 83 #define CT_LINEBREAK 98 #define CT_USER 99 Someone known anything about of this control types? -
moveTo/doMove doesnt work 100%
vova _fox replied to nullsystems's topic in ARMA - MISSION EDITING & SCRIPTING
_num = 1 #loop ~1 _array = nearestObjects [player, ["SoldierEB"], 50] _i=0 {if (alive _x) then {_array set[_i, _x]; _i=_i+1}} foreach _array _array resize _i ? count _array < 1 : goto "loop" _selection = _array select _num hint format["%1",_selection] goto "loop" -
Counting players in a marker area
vova _fox replied to Binary's topic in ARMA - MISSION EDITING & SCRIPTING
I'am don't think that's good: format["%1", loop]=false when i'am use that in ofp, it often crash game... format["%1", loop] can be "scalar bool array string ..." it no good maybe that beter: Condition: isnil "loop" On Act: .....; loop=nil On Dea: ....; loop=true -
-
If then statements eval all??
vova _fox replied to Doolittle's topic in ARMA - MISSION EDITING & SCRIPTING
Now i'am often use "double if".....: if ( if (isclass _entry) then {!(configname _entry) in _crash} else {false} ) then {_array=_array+(getclass _entry)}; ...etc -
breakOut, breakTo - related to While?
vova _fox replied to 5133p39's topic in ARMA - MISSION EDITING & SCRIPTING
array call func func= { try { _this call func2; } catch { hint _exception; }; }; func2= { { if (errorcondition) then {throw "error ....."}; } foreach _this; }; -
Short viewdistance for ai?
vova _fox replied to Ike_fin's topic in ARMA - MISSION EDITING & SCRIPTING
Try use that unit setskill ["spotDistance", 0.01] -
Height error with getpos being on buildings
vova _fox replied to rrores's topic in ARMA - MISSION EDITING & SCRIPTING
But if you check height of vehicle by this, result willbe not correctly. Universal (vehicles/units) <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">(unit modeltoworld ((boundingbox unit) select 0)) select 2 -
AI eventhandler problem
vova _fox replied to nullsystems's topic in ARMA - MISSION EDITING & SCRIPTING
it because you again use private var in initialization "_unit = this" <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">? not local server : exit; _unit = _this select 0; _spawn = _this select 1; _grp = group _unit; ~2 HideBody _unit; ~2 deleteVehicle _unit; _unit = _grp createUnit ["ack_dpd_4", _spawn, [], 0, "NONE"]; _unit setRank "corporal"; _unit setskill 0.6; temp=str _spawn; publicvariable "temp"; _unit setVehicleInit "this addeventhandler [""killed"", {[this,call (compile temp)] exec ""respawnDead.sqs""}];" processInitcommands; exit; -
a simple looped SQF script
vova _fox replied to SouthSaturnDelta's topic in ARMA - MISSION EDITING & SCRIPTING
use waituntil -
AI eventhandler problem
vova _fox replied to nullsystems's topic in ARMA - MISSION EDITING & SCRIPTING
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> temp=str _spawn; publicvariable "temp"; _unit setVehicleInit "this addeventhandler [""killed"", {[this,call (compile temp)] exec ""respawnDead.sqs""}];" -
Converting Strings
vova _fox replied to ColonelSandersLite's topic in ARMA - MISSION EDITING & SCRIPTING
My version of string to array function, based on cex's str2arr.cpp vf_strtoarray.sqf <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">vf_sta_chars=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"," ","0","1","2","3","4","5","6","7","8","9",".",",",":","-","_"]; vf_sta_probel1000=""; for "_i" from 1 to 1000 do { vf_sta_probel1000=vf_sta_probel1000+" "; }; vf_sta_probel100=""; for "_i" from 1 to 100 do { vf_sta_probel100=vf_sta_probel100+" "; }; vf_sta_probel1_9=[""," "," "," "," "," "," "," "," "," "]; { private["_p","_str","_array","_char","_old"]; _array=[]; _old=""; _str=""; for "_i" from 2038 to 1 step -1 do { _p=""; for "_b" from 1 to (_i-_i mod 1000)/1000 do {_p=_p+vf_sta_probel1000}; for "_b" from 1 to (_i mod 1000 - _i mod 100)/100 do {_p=_p+vf_sta_probel100}; for "_b" from 1 to (_i mod 100 - _i mod 10)/10 do {_p=_p+" "}; _p=_p + (vf_sta_probel1_9 select (_i mod 10)); call compile(format["%1_str = ""%2",_p,_this] + """"); if (_old == _str) exitwith {_array}; _char={ if (_str==_old+_x) exitWith {_x}; ""} forEach vf_sta_chars; if (_char!="") then {_array=_array+[_char]}; _old=_str; }; _array } using: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_func=call (compile (preprocessfile "vf_strtoarray.sqf")); _array="string" call _func; about function first: this function use global variables vf_sta_chars vf_sta_probel1000 vf_sta_probel100 in vf_sta_chars array all chars that function will be added to array if they are in the given string. If char doesn't exist in vf_sta_chars the searching isn't stop when find that in array...english .. simple example: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _text="//string" call _func; result will be _text=["s","t","r","i","n","g"]; then "/" isn't exist in vf_sta_chars but converting don't stop and return ["s","t","r","i","n","g"], all chars that exist in vf_sta_chars and second this function convert 2000 chars by ~ 0.064 seconds, i think it fast -
nearestobject id and all?1
vova _fox replied to vova _fox's topic in ARMA - MISSION EDITING & SCRIPTING
hahaha i'am everytime type nearestobject [getpos player,["all"], 100] i'am forgot that that objects aren't have classes <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">nearestObjects [position player,[], 100] Works great! Thanks, fasad -
As i understand only 'nearestobject id' command can find objects like trees, shapes..etc. But it not universal, because id has various numbers and usually don't depend but it positions on isalnd. I need more universal script \ function, that can find all objects at some position with some radius, with types and without types. Any ideas?