-
Content Count
816 -
Joined
-
Last visited
-
Medals
Everything posted by Schatten
-
RSCListBox return Value "<null>"
Schatten replied to .Avoid's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@.Avoid, sure, @gc8 already provided working solution in this message of this topic. -
RSCListBox return Value "<null>"
Schatten replied to .Avoid's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@.Avoid, replace this string in your code: _selected = parseNumber lbData[1011,lbCurSel 1011]; by this. -
RSCListBox return Value "<null>"
Schatten replied to .Avoid's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@.Avoid, use this! -
Variable Names for Units Spawned From Array
Schatten replied to Lineman's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Really? Proofs? -
comparing equal, but disordered arrays
Schatten replied to Tankbuster's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@pierremgi, sorry, I was wrong -- have noticed that if arrays have same length then order of elements of returned by arrayIntersect command array match with one of second array: _array1 = ["beer", "steak", "girls1", "gaming", "chocolate"]; _array2 = ["chocolate", "gaming", "girls", "steak", "beer"]; _result = _array1 arrayIntersect _array2; // ["chocolate", "gaming", "steak", "beer"] Otherwise, if arrays have not same length, then order of elements match with one of first array: _array1 = ["beer", "steak", "girls1", "gaming", "chocolate"]; _array2 = ["chocolate", "gaming", "steak", "beer"]; _result = _array1 arrayIntersect _array2; // ["beer", "steak", "gaming", "chocolate"] Looks like your solution is the best! -
comparing equal, but disordered arrays
Schatten replied to Tankbuster's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Well... Unfortunately, my solution will fail with these arrays: _array1 = ["beer", "beer", "steak", "girls", "gaming", "chocolate"]; _array2 = ["chocolate", "gaming1", "gaming", "girls", "steak", "beer"]; _result = (count (_array1 arrayIntersect _array2)) == (count _array1); // true, because "_array1 arrayIntersect _array2" returns array with 6 elements: ["beer", "steak", "girls", "gaming", "chocolate", "gaming1"] Seems, this is the best solution for sortable arrays. If arrays contain non sortable elements (e. g., objects), you can try this solution: ((_array1 apply {str _x}) sort true) isEqualTo ((_array2 apply {str _x}) sort true) Unfortunately, this solution can fail in case if order of elements of returned by "_aa arrayIntersect _bb" array differs with one of _bb. -
comparing equal, but disordered arrays
Schatten replied to Tankbuster's topic in ARMA 3 - MISSION EDITING & SCRIPTING
_array1 = ["beer", "beer", "steak", "girls", "gaming", "chocolate"]; _array2 = ["chocolate", "gaming", "gaming", "girls", "steak", "beer"]; _result1 = (count (_array1 arrayIntersect _array2)) == (count _array1); // false _result2 = (count (_array1 arrayIntersect _array2)) == (count (_array1 arrayIntersect _array1)); // true But, as we can see, arrays are not equal! -
comparing equal, but disordered arrays
Schatten replied to Tankbuster's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Tankbuster, another solution: (_array1 sort true) isEqualTo (_array2 sort true) -
comparing equal, but disordered arrays
Schatten replied to Tankbuster's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Tankbuster, (count (_array1 arrayIntersect _array2)) == (count _array1) -
Variable Names for Units Spawned From Array
Schatten replied to Lineman's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Lineman, { call (compile (format (["%1 = '%2' createUnit [_CorpSpawnPosition, newGroup];"] + _x))); } forEach [ ["SpawnSoldier_02", "B_SOLDIER_A_F"], ["SpawnSoldier_03", "fow_s_ger_heer_rifleman"] ]; sleep 1; removeUniform SpawnSoldier_02; -
Using a vehicle's class name to get it's real name
Schatten replied to Tostm8's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Tostm8, _displayName = getText (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName"); -
(SOLVED) Spawn vehicle on player-placed marker?
Schatten replied to Thorimus's topic in ARMA 3 - MISSION EDITING & SCRIPTING
https://community.bistudio.com/wiki/Variables#Scopes -
(SOLVED) Spawn vehicle on player-placed marker?
Schatten replied to Thorimus's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Thorimus, sure, _vic1 is defined only in if-statement scope. For _vic1 to be defined outside, just place _vic1 = objNull; after _marker = ""; But don't forget check if _vic1 is null! -
(SOLVED) Spawn vehicle on player-placed marker?
Schatten replied to Thorimus's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Thorimus, _marker = ""; {if ((markerText _x) == "Vehicle Here") exitWith {_marker = _x;};} forEach allMapMarkers; if (_marker != "") then { _vic1 = createVehicle ["C_Offroad_01_F", getMarkerPos _marker, [], 0, "NONE"]; }; -
(SOLVED) Spawn vehicle on player-placed marker?
Schatten replied to Thorimus's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Thorimus, _marker = ""; {if ((markerText _x) == "Vehicle Here") exitWith {_marker = _x;};} forEach allMapMarkers; -
setpos getpos and setdir getdir
Schatten replied to Barba-negra's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@elthefrank, moreover, place setDir before setPos (see notes). -
read scripts from an addons
Schatten replied to Barba-negra's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@elthefrank, do not use @ symbol. -
BIS_fnc_fireSupportVirtual error message
Schatten replied to Lineman's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Lineman, use spawn instead of call. -
Need help with a trigger
Schatten replied to [email protected]'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
@[email protected], if I understood correctly: this and {!(triggerActivated Trigger2)} -
Activate waypoint when group is inside vehicle
Schatten replied to [email protected]'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
@[email protected], very strange... Do you use waypoint of "MOVE" type? If so, insert this code into "On act." field: (vehicle this) land "LAND"; -
Activate waypoint when group is inside vehicle
Schatten replied to [email protected]'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
@[email protected], use visible or invisible helipad. -
Activate waypoint when group is inside vehicle
Schatten replied to [email protected]'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
@[email protected], check each unit: _aliveUnits = (units (group player)) select {alive _x}; ({_x in vehicleName} count _aliveUnits) == (count _aliveUnits) -
How to Spawn and Delete Functions from Trigger Init's?
Schatten replied to [email protected]'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
@[email protected], you can't delete finally compiled functions. But you can delete objects (crows) created by function: {deleteVehicle _x;} forEach bis_crows; -
@gc8, look at example 2: https://community.bistudio.com/wiki/allTurrets.
-
need help with trigger
Schatten replied to twistking's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@twistking, seems like result of isTouchingGround command is still inaccurate. However, it works fine for me, at least in VR map. Well, it is also possible to check altitude: this and {({((getPos (vehicle _x)) select 2) < 0.5} count thisList) > 0}- 5 replies
-
- 2
-
-
-
- trigger
- setdammage
-
(and 1 more)
Tagged with: