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. You need to use nested loops: { _FriendlyUnit = _x; { _KnowledgeArray = _FriendlyUnit targetKnowledge _x; ... } forEach _EnemyUnits; ... } forEach _FriendlyUnits;
  2. Check if an UAV backpack is in a weapon holder.
  3. Use either BIS_fnc_wpLand function or _waypoint setWaypointType "SCRIPTED"; _waypoint setWaypointScript "A3\functions_f\waypoints\fn_wpLand.sqf";
  4. Well, according to the BIKI: Directly relate. Again, according to the BIKI: Very strange. BIKI describes this, @pierremgi described this + provided code snippets... Have you tried this one? Have you checked arguments values? Have you changed arguments number and their values, to see how they change inside the script?
  5. I provided a set of links to articles, have you read them? You can't pass the variable, defined in the scope, to arguments param, as it's outside the scope.
  6. This variable isn't passed in any way in this script. But you can pass it as usual: https://community.bistudio.com/wiki/Function#Parameters_(input) https://community.bistudio.com/wiki/Parameter These articles explain everything: https://community.bistudio.com/wiki/params https://community.bistudio.com/wiki/addAction
  7. 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.
  8. You can do it the same way I did.
  9. 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"];
  10. You can use this instead: ([unit1, unit2, unit3] findIf { _x inArea thisTrigger }) < 0 There is no command all.
  11. 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.
  12. Slight improvement: (thisList findIf { (objectParent _x) == CHINOOK }) >= 0 😁
  13. What if another unit appears? Better solution: ([unit1, unit2, unit3] findIf { !(_x inArea thisTrigger) }) < 0 😉
  14. Just remotely execute your function on server side whenever you need this.
  15. You can set your CHINOOK to trigger owner and change trigger activation condition to this and { player in (thisList select 0) }
  16. 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;
  17. 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));
  18. CIV_REHEN_NAMUVAKA_1 is not an array, but a group. Revert this code as it was originally.
  19. 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); } ];
  20. 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.
  21. Remove/comment out lines 977-979.
  22. Do you mean this? If so then this is the bug.
  23. I guess that's because of quotes and apostrophes. Try to invert them.
  24. 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; };
×