Jump to content

opusfmspol

Member
  • Content Count

    711
  • Joined

  • Last visited

  • Medals

Everything posted by opusfmspol

  1. See if this works for dedicated: if (isServer) then { _null = this spawn { Hunt_players_fnc = { _player = objNull; _players = +(allPlayers - (entities "HeadlessClient_F")); _distance = 100000; { if (alive _x && _x distance (Leader _this) < _distance) then { _distance = _x distance (Leader _this); _player = _x; }; } foreach _players; if !(isNull _player) then { _wp = (Group _this) addWaypoint [getPos _player, (50 + (floor(random 70)))]; _wp setWaypointStatements ["true","_null = this spawn Hunt_players_fnc;"]; _wp setWaypointType "SAD"; _wp setWaypointCombatMode "RED"; _wp setWaypointSpeed "FULL"; }; }; _null = _this spawn Hunt_players_fnc; }; };
  2. _index = _sectors findIf { _x params[ "", "_sector" ]; _sectorOwner = _sector getVariable[ "owner", sideUnknown ]; _sectorOwner isEqualTo sideUnknown || _sectorOwner isEqualTo West }; //Find a flat position around the LZ marker & create an HPad there. _flatPos = [getPos ( _sectors select _index select 1 ), 0, 550, 10, 0, 0.3, 0] call BIS_fnc_findSafePos; Yeah, the _index findIf would return -1 as _index when Opfor or Independent holds all. You could test for that. If that's the case you could exit the script, if that's what you want to happen. if (_index < 0) exitWith {};
  3. Checking "Server Only" is correct. Condition breaks it on dedi because Player is objNull on a dedicated server. Try using: ({_x In thisList} count AllPlayers > 0) as condition. -- edit: Also check the script for "player", that would have to target a _unit instead on dedi.
  4. opusfmspol

    Search in array

    _owner = objNull; {if (player distance (_x select 1) < 5) then {_owner = _x select 0};} forEach _Array; 5 is just suggestive radius for "inside a house". Houses will be bigger or smaller. Or use 1 or 0 if you want player right on the spot.
  5. opusfmspol

    joinSilent on dedi server

    Try this: [_this select 0] joinSilent (Group (_this select 1));
  6. Maybe an Order of Operations issue, maybe not? If so, I would think it should occur consistently. What it means is confusion might occur over which command to run first, when multiple commands are in an expression and precedence is not conditioned ( ). Example: _flatPos = [getPos ( _sectors select _index select 1 ), 0, 550, 10, 0, 0.3, 0] call BIS_fnc_findSafePos; // Could get run as: _flatPos = [getPos ( (_sectors select _index) select 1 ), 0, 550, 10, 0, 0.3, 0] call BIS_fnc_findSafePos; // or: _flatPos = [getPos ( _sectors select (_index select 1) ), 0, 550, 10, 0, 0.3, 0] call BIS_fnc_findSafePos;
  7. opusfmspol

    AI won't shoot with rockets on vehicle target.

    addVehicle
  8. opusfmspol

    FSM variables...

    Are the set variables still available after an FSM has completed (reached end state)? I've never tested for that.
  9. opusfmspol

    FSM variables...

    Not tested, but try this: _fsm setFSMVariable ["_handle", _fsm]; _fsm setFSMVariable ["_result", false]; and inside the running _fsm: _handle setFSMVariable ["_result", true];
  10. When creating a scenario in A2's 3d Editor, two files get created, the mission.biedi and the mission.sqf. The setPlayable command can be seen used in the mission.sqf, when a unit is placed and set as playable. So maybe it's a deprecated editor-only command, or maybe it's usable only in 3DEN or 2D setup, I dunno.
  11. opusfmspol

    FSM variables...

    Have you tried to use setFSMVariable ?
  12. opusfmspol

    Whitelisting 'addAction'?

    Condition for addAction is a "string", not {code}. And for a string inside the string (i.e., "whitePlayer"), you would use 'semiquotes' (i.e., 'whitePlayer').
  13. opusfmspol

    object ignore script

    setVariable in the dead body objects, and modify the cleanup script to look for the variable. If nil or false, clean up but if found true don't clean up. Or modify the cleanup script to include an object blacklist to check, and add the bodies to the blacklist. Probably other ways also.
  14. For trigger condition, count the living units of each group to see whether at least one from each group is in the trigger list, and when count is correct the condition returns true, else false. Example (not tested): grpsPresent = []; {if ({Alive _x && _x In thisList} Count (Units _x) > 0) then {grpsPresent pushBack _x};} forEach [grpTeam1,grpTeam2,grpTeam3,grpTeam4,grpTeam5]; Count grpsPresent >= 5
  15. opusfmspol

    Keep waypoints after respawn

    1. Use a Respawn event handler. Don't use "player" for setVariable / getVariable, because the player object will change. Refer to _unit and _corpse as given in the example. 2. Waypoints are a group function, they belong to the group. When a team gets wiped out, the group is subject to getting deleted. Waypoints get deleted with the group. There are various ways to prevent this sort of thing happening. What kind of activation effects are you saying happened?
  16. opusfmspol

    kbTell help

    If using the BIS_fnc_kbTell method, recommend you check the function in Function Viewer and review your params versus how they get used by the function. BIS_fnc_kbTell adds a lot of plumbing to what should often be a simple flush using kbTell. Best I've ever gotten from it, it helps in understanding what the "argumentArray" argumentValue (which is typically an empty code) might be for. I've never found anything else explaining the argumentValue. And if unaware, review Conversations page to ensure the description.ext and .bikb are set up correctly, since it includes comments the given video never mentioned. Haven't used BIS_fnc_kbTell that I can recall, so can't suggest more on that. As far as kbTell used directly per the original post, I just realized that in your script file was this: james kbTell [kerry, "briefing", "T1","SIDE"]; waitUntil { james kbWasSaid [kerry, "br1iefing", "T1", 5]}; A typo existed, you had James speaking from topic "briefing" but then wait for him to speak from topic "br1iefing". So the waitUntil would never be satisfied. Explains why you got first subtitle and nothing further. Also, using sleep or waitUntil with a kbTell conversation, you have to consider whether the conversation script is running in scheduled or unscheduled environment. Needs to run in scheduled environment where suspension (i.e., sleep or waitUntil) is allowed. BIS_fnc_kbTell page mentions it will spawn a new thread, which ensures its conversation handling doesn't run in unscheduled environment. Would think neither of those would explain the sound not playing though, so might also suggest to verify the given file paths to the sounds are correct.
  17. opusfmspol

    kbTell help

    In this conversation (similar issue), the problem was that the unit didn't have a radio.
  18. opusfmspol

    Custom Map Maker

    Seems cfgMarkers is not listed on Description.ext page, so might not be one of the supported classes.
  19. opusfmspol

    Custom Map Maker

    scope 0 is private. Needs to be scope 1 or 2.
  20. Perhaps the DLC 'watermarks' appear when one doesn't have it? Couldn't say, since I do have Apex.
  21. Try synchronizing both ways, each to the other: MODULENAME synchronizeObjectsAdd [vehicle1]; vehicle1 synchronizeObjectsAdd [MODULENAME];
  22. Might be the units in the config viewer cfgVehicles who have "_sick" at end of their typename. They have config scope 1, which is protected access.
  23. opusfmspol

    Stringtable.xml problem

    Assuming you have your mission's stringtable.xml set up correctly as per the examples given, and STR_CAS_Text1 is the correct Key ID given, the usage in the call should be: [allPlayers, ["task1"],[Localize "STR_CAS_Text1","Oreokastro",""],[4600,21400], true, 99, true, "attack", true] call BIS_fnc_taskCreate; $ is used when setting the string text in a config (e.g., Description.ext is a config). Running a script or scripted function, localize is used to get the string text. For a little more clarity, although BIS_fnc_taskCreate is a defined config function, its code is compiled from script and you're calling its code.
×