Jump to content

opusfmspol

Member
  • Content Count

    719
  • Joined

  • Last visited

  • Medals

Everything posted by opusfmspol

  1. opusfmspol

    A trigger to one side

    And If mission is intended for dedicated server use, also remove the if-then condition to run the script. Just execute the script. By enabling 'Server Only' option, and letting the (!isDedicated) condition remain, the script would never get executed on a dedicated server. But would work fine for SP and MP hosted, the host's trigger would execute the script when activated.
  2. Why the doStop? He's obeying the command....
  3. It's from allMapMarkers, and not from the forEach. It's from an apply in BIS_fnc_sortBy. Using the debug console function viewer, you should be able to review the function itself (falls under category Arrays).
  4. opusfmspol

    object randomization question

    use selectRandom radiolist instead of selectRandom [radiolist]. radiolist is already an array. I should have observed that before with selectRandom [array] also.
  5. opusfmspol

    object randomization question

    array = [cache_a, cache_b, cache_c, cache_d, cache_e]; random_cache_a = selectrandom [array]; array = array - [random_cache_a]; random_cache_b = selectrandom [array]; array = array - [random_cache_b]; random_cache_c = selectrandom [array]; array = array - [random_cache_c]; random_cache_d = selectrandom [array]; array = array - [random_cache_d]; random_cache_e = selectrandom [array]; array = array - [random_cache_e];
  6. opusfmspol

    Marker on top of other marker

    Maybe try EachFrame event handler, and Count allMapMarkers array. Count changes when markers get added or deleted. Could create a custom array at mission start, and use that to refresh position of the original markers whenever a new marker is added during mission?
  7. opusfmspol

    object randomization question

    Not tested, and not sure I correctly understand what you're seeking, but might could try setVariable in each radio an array of it's parameters: _radio setVariable ["data",[_triggerA,_triggerB,_taskName,_music, etc., etc. . . . .]]; Create an array listing the radios, and while selecting the radios randomly, remove them from the array as they get selected and assigned to each cache. Then setVariable in each cache its selected radio object: _cache setVariable ["radio",_radio]; then use getVariable with params or param to define them for use. _data = ((_cache getVariable "radio") getVariable ["data",[objNull,objNull,"",configNull]]) params ] ["_triggerA",objNull,[objNull]], ["_triggerB",objNull,[objNull]], ["_taskName","",[""]], ["_music",configNull,[configNull]] ]; if !(_data) then { // data verification to help identify errors };
  8. opusfmspol

    Trigger Bug?

    Params command always applies the alternative syntax. When using main syntax, it uses _this as argument for the alternative syntax. And when _this is not an array it gets placed into an array, but if already an array it remains as is. So yes, you wrap a single array argument when you want the given variable defined with the array intact. When you want the array's element(s) assigned to given variable(s), you don't wrap.
  9. opusfmspol

    Reveal for ACM units

    ACM = ACM module. Target = unit to be revealed. Not tested, but should give you the idea what to look for and get you started. In Init.sqf: if (Local ACM) then { niv = [ACM,Target] spawn { _acm = _this select 0; _target = _this select 1; waitUntil {!isNil {_acm getVariable "initDone"}}; waitUntil {_acm getVariable "initDone"}; while {!isNull _acm} do { sleep 3; _scopes = +(_acm getVariable "patrolScopes"); if (count _scopes > 0) then { { _scope = _x; _grps = +(_scope getVariable "groups"); if (!isNil "_grps") then { _grps = _grps - [grpNull]; if (count _grps > 0) then { {_x Reveal _target;} forEach _grps; }; }; } forEach _scopes; }; }; }; };
  10. 1. Give better information. It was put in the local player init script, or in the player's init attribute field in editor? The discussion indicated the editor field inits wouldn't work. Should go in a local player init script. 2. The event handler is checking player and object variables, so the handler should not get added until player and the modules have initialized. 3. The handler doesn't check for the variables being nil. You want to include isNil checks to deal with when they come back nil. 3. Post the error given. Tough to guess when not given. But maybe the object variables are nil if they haven't yet been set. 4. Also should post the code as you have used it. We could assume you copy pasted accurately, but hey, sometimes not, it happens. 5. Pay attention to @Larrow's given description of the conditions. Third condition checks for a support being in progress. Is that what you want?
  11. opusfmspol

    Trigger Bug?

    Can be anything. An array can be viewed as a list and can contain any data types, including nested arrays (lists). When your trigger runs "thisList call civCred", it is passing an array (thisList) to your civCred function, which civCred receives as _this. The elements within the array are objects in the trigger. When civCred runs "params["_civList"];" on the received list _this, it is taking the first element from the list and defining it as _civList. civCred then runs forEach on that element, not the array. That's why you get the object error, the element is an object from the list, not the list itself. But civCred needs to run the forEach on _this, the received list itself. The forEach then cycles each element of the array. Hope that's more clear.
  12. opusfmspol

    Deleting vehicle (solved)

    What is your current code?
  13. opusfmspol

    Deleting vehicle (solved)

    That's not proper use of || (or). The spawned vehicle is created but not defined by variable.
  14. opusfmspol

    Teleport into vehicle

    !(player in car) With In command, use brackets to get the Boolean before reversing it.
  15. opusfmspol

    Deleting vehicle (solved)

    {alive _x} count (crew vehicle) < 1 Crew command counts dead units and if a killed unit remains inside the vehicle, it won't delete.
  16. opusfmspol

    Teleport into vehicle

    Need to consider scheduled vs. unscheduled environment when using suspension (like sleep, or waitUntil). Editor triggers fall under unscheduled environment. Init scripts fall under scheduled environment.
  17. opusfmspol

    Teleport into vehicle

    Might point out, when one says 'dialogue' here it could be confused by some with display dialog. Language dialogue is better referred to as chat or conversation. Are you using simple (unit <type>Chat "text") or using kbTell conversation? - In the case of chat text, use sleep or another delay. - With the conversation system, when using sound files the kb commands or functions help, like kbWasSaid, kbReact or calling BIS_fnc_kbTell. They wait for sound samples to play. (My experience is that kbWasSaid has to be run where the unit speaking is local.) But when not using sound files, conversation kb's complete with the chat displayed and you would use sleep or other delay for added time, allowing people to read the chat. As to where to put your lines of code, it depends on whether you intend it to be SP only, MP hosted or MP dedicated, who is running which commands, and in which scripts the commands are run. For multiplayer you need to consider each command's locality icons. Most indicate where the commands need to run and whether effect is local or global.
  18. opusfmspol

    How do i cancel a task with a trigger?

    Check BIS_fnc_taskSetState in functions viewer. Task is supposed to be a string. "Infiltrate"
  19. opusfmspol

    Check support menu

    Perhaps try: inGameUISetEventHandler Never used it though. You would need the 'engine based action name' for (8) in (0-8). Don't know whether it uses the action name, or Action names, or the CfgCommunicationMenu classname of the selection (or the class's text value), or what. inGameUISetEventHandler ["Action", "if (_this select 3 == << Support menu (8) >>) then {<< code >>; << code >>; << boolean >>}"];
  20. Review the Commands page on how params command is properly used. You're using it as if it was private command. When you execVM at the end, pass in the same params as addAction does and the params command at the beginning will define them again and make them private. No need for select. But that's not the only problem, as 7erra says the script has several problems. Review each command the script is using and you should start finding them.
  21. opusfmspol

    Quick Native FSM question(s)

    I've always used scriptedFSM for the few I've done. Don't know what the differences in any of the others would be. Not that knowledgable.
  22. opusfmspol

    [HELP] MP money system

    A dead unit is side civilian. Use playerSide for players or group side for AI. Would also suggest you define your pClient and pKilled variables with default values before adding the public variable event handlers.
  23. Sorry, my mistake, I read apply and misunderstood one of its examples. That will define myArray as an array of trues and falses. myArray = []; {if (!isNull _x) then {myArray pushBack _x};} forEach [test,p1,p2,p3,p4,p5,p6,p7,p8]; ({_x In heli1} count myArray == {_x In allPlayers} count myArray);
  24. myArray = [test,p1,p2,p3,p4,p5,p6,p7,p8] apply {!isNull _x}; ({_x In heli1} count myArray == {_x In allPlayers} count myArray); myArray should list only units present in the mission (AI turned off should not list). Then == counts should be true when number of players in heli1 equals number of players in myArray. Or maybe I'm mistaken about AI units turned off will be null?
  25. Okay, then disregard that one. Check whether "test" unit is listed in allPlayers. I was wondering whether Zeus uses remoteControl to control units, and if so, whether a remoteControl unit would list in allPlayers. I don't know enough about Zeus function. But then I suppose it depends also whether "test" is your joined player unit who has the Zeus function, or "test" is a Zeus controlled unit.
×