Jump to content

Schatten

Member
  • Content Count

    769
  • Joined

  • Last visited

  • Medals

Everything posted by Schatten

  1. Looks like you haven't tried my code. Try it -- replace forEach's body. Pay attention to the second arg for addAction -- just passing the path to the script is enough.
  2. You can do it the same way I did.
  3. Just get unit class name and use it in the title: _Object addAction [format ["How do I add the %1 here", typeOf _x], "Scripts\Blah.sqf"];
  4. You can use this instead: ([unit1, unit2, unit3] findIf { _x inArea thisTrigger }) < 0 There is no command all.
  5. Be careful, findIf returns index of the unit found, not quantity! So your condition, ([unit1, unit2, unit3] findIf {!(_x inArea thisTrigger)}) isEqualTo 0 will be true if only the first unit is not in area.
  6. Slight improvement: (thisList findIf { (objectParent _x) == CHINOOK }) >= 0 😁
  7. What if another unit appears? Better solution: ([unit1, unit2, unit3] findIf { !(_x inArea thisTrigger) }) < 0 😉
  8. Just remotely execute your function on server side whenever you need this.
  9. You can set your CHINOOK to trigger owner and change trigger activation condition to this and { player in (thisList select 0) }
  10. The problem is that a server and clients have their own profile namespaces, therefore you should request data from the server: // initServer.sqf sendDataToClient = { private ["_data", "_varNames"]; params ["_player"]; _data = []; _varNames = switch (vehicleVarName _player) do { case "kiba3x": { ["KIB_kibaPos", "KIB_kibaRating"] }; case "kavhan": { ["KIB_kavhanPos", "KIB_kavhanRating"] }; default { ["KIB_konalPos", "KIB_konalRating"] }; }; { _data pushBack (profileNamespace getVariable _x); } forEach _varNames; missionNamespace setVariable ["clientData", _data, if (_player == player) then { false } else { owner _player }]; }; // initPlayerLocal.sqf if (isServer) then { [player] call sendDataToClient; } else { [player] remoteExecCall ["sendDataToClient", 2]; }; waitUntil { !(isNil "clientData") }; clientData params ["_position", "_rating"]; clientData = nil; player setPosATL _position; player addRating _rating;
  11. I didn't quite understand what you want, but this is simplified version of your code: _varName = format ["Pos_Reh_Namuvaka_%1", (floor (random 9)) + 1]; (leader CIV_REHEN_NAMUVAKA_1) setPos (getPos (missionNamespace getVariable _varName));
  12. CIV_REHEN_NAMUVAKA_1 is not an array, but a group. Revert this code as it was originally.
  13. That's because your code is wrong. I guess it should be like this (pay attention to the formatting and readability): _x addAction [ ":: Rescue - Rescatar :: ", { ["Task_CIV_REHEN_NAMUVAKA_1", "SUCCEEDED"] call BIS_fnc_taskSetState; { _x setCaptive false; _x enableAI "PATH"; _x setUnitPos "AUTO"; } forEach (units CIV_REHEN_NAMUVAKA_1); (units CIV_REHEN_NAMUVAKA_1) joinSilent (group player); } ];
  14. This is because there is no such event script.
  15. If you were able to highlight the code, then you can remove it. This code should be executed once, therefore it should be placed, for instance, in initServer.sqf event script. Make the code readable, don't use strings with code (since code highlighting doesn't work in strings), as I demonstrated, and use programmer's editor with code highlighting.
  16. Remove/comment out lines 977-979.
  17. Do you mean this? If so then this is the bug.
  18. I guess that's because of quotes and apostrophes. Try to invert them.
  19. That's because BIS_fnc_initVehicle doesn't work with string. Try this code snippet: if (_initstring isEqualType "") then { ([_cargo] + (parseSimpleArray (format ["[%1]", _initstring]))) call BIS_fnc_initVehicle; };
  20. You already did so in the second piece of code, just change other params. The same for me.
  21. @avibird 1, just modify my code: [ this, "DELAY=", 300, "START=", 60, "PAUSE=", 100, "EXIT=", myExitTrigger2, "INIT=", toString { { doStop _x; } forEach (units _proxyThis); } ] spawn jebus_fnc_main;
  22. https://community.bistudio.com/wiki/Arma_3:_Server_Config_File#Server_Options -- forceRotorLibSimulation parameter.
  23. [ this, "DELAY=", 300, "START=", 60, "PAUSE=", 100, "EXIT=", myExitTrigger2, "INIT=", toString { _actionParameters = [ "On Knees", { (_this select 0) playMove "Acts_ExecutionVictim_Loop"; }, nil, 1.5, true, true, "", "true", 1.5 ]; { _x disableAI "PATH"; _x addAction _actionParameters; } forEach (units _proxyThis); } ] spawn jebus_fnc_main;
  24. Don't know for sure -- I just write scripts in accordance to the BIKI, and it says that if radius is zero or positive, then you should use PositionAGL, otherwise you should use PositionASL.
  25. No, according to the BIKI: Just noticed, that PositionASL should be used if radius is negative, so this is fixed version: _wp = BB addWaypoint [AGLToASL (randomPoint call BIS_fnc_randomPosTrigger), -1];
×