Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×

Schatten

Member
  • Content Count

    816
  • Joined

  • Last visited

  • Medals

Everything posted by Schatten

  1. @CY4, use this code: _loadoutWeightsInfo = thisList apply { format ["%1: %2lbs", name _x, (round ((loadAbs _x) * 10)) / 10 ^ 2] }; hintSilent (parseText (format ["Loadout Weight<br/>%1", _loadoutWeightsInfo joinString "<br/>"]));
  2. Schatten

    execVM not running?

    call command doesn't accept path to a function. Also, you already added your function into function library, so use this code: remoteExec ["AURA_fnc_SFInteraction"];
  3. Schatten

    hint parseText for MP

    @7erra, thanks for the clarification. It's possible to use this simplified code: { hint parseText "Who<br/><img size='5' image='pic\man.jpg'/><br/>is it?"; } remoteExec ["call"];
  4. Schatten

    hint parseText for MP

    @major-stiffy, try this: (parseText "Who<br/><img size= '5' image='pic\man.jpg'/><br/>is it?") remoteExec ["hint"];
  5. You can create 35 markers and the script, that creates 105 triggers. Also, I missed that your trigger is activated by any player, so here is updated version: - trigger condition: (this and { !(thisTrigger getVariable ["script1Started", false]) }) or { _unit = thisList select 0; (((_unit distance thisTrigger) < 50) and { !(thisTrigger getVariable ["script2Started", false]) }) or { ((_unit distance thisTrigger) < 10) and { !(thisTrigger getVariable ["script3Started", false]) } } } - on activation: if (!(thisTrigger getVariable ["script1Started", false])) then { execVM "scripts\scripts_1.sqf"; thisTrigger setVariable ["script1Started", true]; }; call { _unit = thisList select 0; if (((_unit distance thisTrigger) < 50) and { !(thisTrigger getVariable ["script2Started", false]) }) then { execVM "scripts\scripts_2.sqf"; thisTrigger setVariable ["script2Started", true]; }; if (((_unit distance thisTrigger) < 10) and { !(thisTrigger getVariable ["script3Started", false]) }) then { execVM "scripts\scripts_3.sqf"; thisTrigger setVariable ["script3Started", true]; }; };
  6. @Coladebote, trigger condition: (this and { !(thisTrigger getVariable ["script1Started", false]) }) or { ((player distance thisTrigger) < 50) and { !(thisTrigger getVariable ["script2Started", false]) } } or { ((player distance thisTrigger) < 10) and { !(thisTrigger getVariable ["script3Started", false]) } } on activation: if (!(thisTrigger getVariable ["script1Started", false])) then { execVM "scripts\scripts_1.sqf"; thisTrigger setVariable ["script1Started", true]; }; if (((player distance thisTrigger) < 50) and { !(thisTrigger getVariable ["script2Started", false]) }) then { execVM "scripts\scripts_2.sqf"; thisTrigger setVariable ["script2Started", true]; }; if (((player distance thisTrigger) < 10) and { !(thisTrigger getVariable ["script3Started", false]) }) then { execVM "scripts\scripts_3.sqf"; thisTrigger setVariable ["script3Started", true]; }; Seems that creating 3 triggers can be simpler.
  7. How exactly do you run it? You should pass path to a file: execVM "myCode.sqf";
  8. I guess you need this: _marker = allMapMarkers select (allMapMarkers findIf { (markerColor _x) == "ColorOPFOR" });
  9. Sure, call { private ["_distance", "_distanceMin", "_marker"]; _marker = ""; _distanceMin = worldSize; { if (((getMarkerColor _x) == "ColorOPFOR") and { _distance = (getMarkerPos _x) distance2D player; (_distance >= 400) and { _distance < _distanceMin } }) then { _distanceMin = _distance; _marker = _x; }; } forEach allMapMarkers; _marker };
  10. distance2D can accept objects, so you don't need to get position in advance. How did you test? If you just copy and paste the code into console, then it won't work. Instead you should wrap it: call { private ["_distance", "_distanceMin", "_marker"]; _marker = ""; _distanceMin = worldSize; { _distance = (getMarkerPos _x) distance2D player; if ((_distance >= 400) and { _distance < _distanceMin }) then { _distanceMin = _distance; _marker = _x; }; } forEach allMapMarkers; _marker };
  11. @Sayker, something like this: private ["_distance", "_distanceMin", "_marker"]; _marker = ""; _distanceMin = worldSize; { _distance = (getMarkerPos _x) distance2D player; if ((_distance >= 400) and { _distance < _distanceMin }) then { _distanceMin = _distance; _marker = _x; }; } forEach allMapMarkers; ?
  12. ([tank1, tank2, tank3, tank4] findIf { (damage _x) >= 0.8 }) >= 0 ({ (damage _x) >= 0.8 } count [tank1, tank2, tank3, tank4]) == 2 ({ (damage _x) >= 0.8 } count [tank1, tank2, tank3, tank4]) == 3 ([tank1, tank2, tank3, tank4] findIf { (damage _x) < 0.8 }) < 0
  13. @Luft08, use this code: #define MARKER "markerName" private _markerSize = getMarkerSize MARKER; private _radius = if ((markerShape MARKER) == "RECTANGLE") then { sqrt ((_markerSize select 0) ^ 2 + (_markerSize select 1) ^ 2); } else { selectMax _markerSize; }; private _minesCount = { _x inArea MARKER } count ((getMarkerPos MARKER) nearObjects ["APERSBoundingMine_Range_Ammo", _radius]);
  14. @gc8, BIS_fnc_holdActionAdd returns action ID. I'm sure you can use it to change the title using setUserActionText command.
  15. Schatten

    1 person view in town

    @Casio91Fin, condition: this && { (vehicle player) in thisList } && { cameraView == "EXTERNAL" } On activation: (vehicle player) switchCamera "INTERNAL"; titleText ["You are\nIN\n1stPV Area!", "PLAIN DOWN", 3];
  16. @pSiKO, if you kill someone from a vehicle, _killer will be the vehicle. You can use this workaround: params ["_unit", "_killer", "_instigator"]; if (!(isNull _instigator)) then { _killer = _instigator; } else { if (!(_killer isKindOf "CAManBase")) then { _killer = effectiveCommander _killer; }; };
  17. _spawn isn't available inside "On deact." field, but you can save action ID in the trigger object: - On act.: thisTrigger setVariable ["actionId", player addAction ["Spawn Units", "spawn.sqf"]]; - On deact.: _actionId = thisTrigger getVariable ["actionId", -1]; if (_actionId >= 0) then { player removeAction _actionId; };
  18. @redarmy, unfortunately, you need to write a script that will monitor each unit in a group and order those of them to return to initial position. Here is example: https://github.com/A3Wasteland/ArmA3_Wasteland.Altis/blob/0554cc7aabc300d2a92a85df361ad5e1dba140db/server/functions/defendArea.sqf#L78
  19. @Alert23, OR has lower priority than AND, so you should use brackets to increase priority: this && vehicle player in thislist && ((a1 inArea trg1) or (b1 inArea trg1)) I recommend to use curly brackets for lazy evaluation: this && { (vehicle player) in thislist } && { (a1 inArea trg1) or { b1 inArea trg1 } }
  20. @SOVIET_IDIOT, strange -- I've just checked it in simple SP mission and it works fine. In the mission I enabled GC, place 2 enemy units, removed the one from GC and kill them -- the one disappeared, but the second didn't. Seems you made mistake somewhere. Try to use isInRemainsCollector command to check.
  21. @redarmy, try this: for "_i" from 1 to 6 do { art1 doArtilleryFire [[["hj"], []] call BIS_fnc_randomPos, "32Rnd_155mm_Mo_shells", 1]; sleep 5; };
  22. @SOVIET_IDIOT, use removeFromRemainsCollector command.
  23. @ziptlytical, try this condition: this and { !(alive officer1) }
  24. @snakeplissken, try this: "Flashdrive" in (magazineCargo SUV)
  25. It's difficult to explain short. I recommend you read about dialogs here. Also there are nice tutorials written by @killzone_kid, first part here.
×