Jump to content

pierremgi

Member
  • Content Count

    7316
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by pierremgi

  1. That's not what intended. allPlayers depends on the moment you run the code and doesn't make difference between JIP and already playing guys!
  2. pierremgi

    MP/PVP - Only one side is allowed to respawn

    Please, you are in a specific case you don't want to trigger anything! So, don't garble the message with your science! For 99.999 % usage of a trigger, you can hint on each frame the thisList result and see what occurs. When fired, thisList is updated within the 0.5 sec slot, the reason why you can have 2 or 3 units in this array, if very close in case of presence check. For sure, a trigger check every 0.5 sec. But, when fired, when thisList takes sense, there is no way to update it without rearming (deactivate) the repeatable trigger.
  3. pierremgi

    Detect if SEA is within an area

    On my mind, it's already included in the 5th parameter of the BIS_fnc_findSafePos !
  4. pierremgi

    crater spam on server

    Only on Unsung?
  5. pierremgi

    Multiplayer Locality

    You can run the code where you want. if you use local variable such as _tsk1, don't forget to spawn it : 0 = [] spawn {...} , like in a trigger for example. And yes, Here is a main script, creating a task (assigned or created), then waiting for its status changed (succeeded), from another script, to be continued. The fact is I did another script to trigger some conditions of success (someMission.sqf). it was just an example that you can run in 2 different scripts what concern the task state. First script: - create task1; - spawn someMission.sqf; // or any name you want - do what you want; - waituntil success of task1; - create another task (for example); .... second script (someMission) - do what you want; - waitUntil some condition are met (triggerActivated or else); - set task1 successful PS: I'm passing "Task1" as argument for execVM the script someMission.sqf. In fact, I didn't test that, you could run the script without argument as far as the task ID "task1" seems to be global (defined for any script on your PC). One sure thing: the "return value or handle" _tsk1 doesn't do the job for setTaskState, even if passed as argument.
  6. You don't need to multiply network exchange: { _x spawn { _plyr = _this; waitUntil {isplayer _plyr}; _plyr moveincargo unit1 } } forEach playableUnits;
  7. Why is it impossible to declare it in description.ext?
  8. pierremgi

    Dialog but Admin only

    Even the BI command admin coming soon!
  9. pierremgi

    Multiplayer Locality

    Don't mix modules and script methods. The tasks Id are too much hard to make them work in this condition. If you place a task module then add settaskstate module also. The triggers are not a real problem edited or scripted (triggerActivated myTrigger...). What I'm using for tasks scripts in MP: _tsk1 = ["task1", true, ["description here","title here",""], getMarkerPos myMarker, "ASSIGNED", 1, true, true,"attack",true] call BIS_fnc_setTask; "tsk1" execVM "someMission.sqf"; ......................... Passing "tsk1" in someMission.sqf script // NOT _tsk1!............................... _tsk = _this; bla bla condition [_tsk,"Succeeded",true] call BIS_fnc_taskSetState; .................................................................................................................................. //1st script to be continued: waitUntil {sleep 0.5; ([_tsk1] call BIS_fnc_taskState) == "Succeeded"}; // _tsk1 here! .................. Anyway, I do prefer bis_fnc_setTask rather than bis_fnc_taskCreate.
  10. pierremgi

    Variable not appearing in hint

    Probably because atm.sqf runs before the game starts (Time>0) or before cash is public. Try a waitUntil {time > 2} in this sqf.
  11. pierremgi

    Syntax seperation help

    Personally, I use createLocation. Something like: _location1 = createLocation ["nameLocal", [8200,3850,0], 400, 400]; ....
  12. pierremgi

    Multiplayer Locality

    Did you link all players to this task?
  13. Yep, my opinion is slightly different. As some people can push their working/complete scripts here, and it's a good idea, there is no reason to avoid some topics even if no clue to start. I like the challenges. And I just skip the topics without answer or interest for me. This topic is clear and seems to me interesting. I attempted to use EH "epeContactStart", which could be smart, but that doesn't work on non physX object (like man). That works with contact on vehicles like cars. So, here is not a perfect script, but a track to what you intend to do: {_x addEventHandler ["killed", { _victim = _this select 0; _killer = _this select 1; if (!isnull objectParent _killer && _victim distanceSqr _killer < 25) then { _dam = vehicle _killer getHitPointDamage "hitHull"; vehicle _killer setHitPointDamage ["hitHull",_dam + 0.3] }; }] } forEach allUnits; Spawned units are not taken into account here.
  14. pierremgi

    Analogic throttle bug

    The reason why i don't buy Jet DLC is the poor attention BI paid for stick parameters, in general. The minimum would have been the 0 to 1 throttle and separate air brakes instead of this weird -1 +1 setting. Not mentioning afterburners.
  15. You just have to place a task module (F5). Choose Intel, create task , then a task ID (not useful if you don't call it in a script, a title, a description, type... just read the tips; synchronize with player(s); add a trigger, optional, to add this task in game and not at start; add a trigger for success, with a condition like: !alive myenemy, sync it to a task state module "succeeded", and sync this module to the task one. You can also add some briefs through diary record module. Read the tips.
  16. With a land_barGate_F, (named bar1 for example) place a repeatable presence trigger with: onActivation: bar1 animateSource ["Door_1_source", 1]; onDeactivation: bar1 animateSource ["Door_1_source", 0];
  17. disregard. answer done when not updated.
  18. You are in multiplayer and you want to work on a cash variable and some equipment for the player. So, just work in the initPlayerLocal.sqf which is a specific script (add it into the mission root if not already present). With this script, cash and equipment will concern the player only. To "couple" a box with a player: - you can spawn the box in this initPlayerLocal.sqf. So the box is identified locally and you just have to fill this box. There is nothing more to do; - or place in advance as much boxes as playable units, name them box1, box2... and add them as a variable attached to the player: * in init field of playable units: this setVariable ["mybox",box1]; (and so on...) * in initPlayerLocal: _myBox = player getVariable "mybox"; // now you refer to the right box.
  19. LVgroup7 must be a group. LVgroup also. units refers to a group (or object). You can use these variables after naming the groups in editor, or spawning them in a script. For example: LVgroup7 = [ [4774, 473, 150], west, ["uns_ch47_m60_1ac"], [], [], [], [], [], 0] call BIS_fnc_spawnGroup; Then, you can count the units when you need it. If you're scripting a loop which can start before the spawn: [] spawn { waitUntil {sleep 1; !isnil "LVGroup7"}; _LVgrp7cnt = count units LVGroup7; while {true} do { waitUntil {sleep 1; count units LVGroup7 < (_LVgrp7cnt *0.3)}; <your code here>; // nothing more, as you replenish the group (i think) } };
  20. Verify the altitude. Sometimes, when you change the place of a ship in editor, this one is no more at sea level but deeper, or in air, if the bottom level has changed.
  21. pierremgi

    Syncing Waypoints?

    It's same. Just test it.
  22. I changed my previous post for more precision. ANYPLAYER wraps all players. The first who meets, the trigger fires. On the other hand, don't ask me why, the trigger seems to rearm if you kill the "winner". It's weird as far as a dead player stays a player, in allPlayers command so far. Anyway, you hit a point. ANYPLAYER will fire triggers, local or not. ANYPLAYER is handy because it sorts player units among plenty of others. You can use BLUFOR or ANYBODY to obtain a working list. But, for a specific firing on one PC only: replace <this> in cond field by: count (thislist select {local _x}) > 0
  23. {_x setVariable ["firing", _x addEventHandler ["Fired", { < your code here>; {_x removeEventHandler ["fired", _x getVariable "firing"]} forEach yourArray; }] ]} forEach yourArray; Why? Because you want to fire just once the code, regardless of the units of your array. Then no more units must trigger this EH and you must remove it on every unit. The only way to identify the good EH to remove, as far as you can have other "fired" EH in addons or else, is to pass it through a variable attached to the unit. That works.
  24. initServer runs on server only. A global variable is global (for each scripts) but local (on PCs where these scripts run). A common variable for all players is public. But it's just an info. So, initPlayerLocal can wait a looong time your global but not public variable. Just proceed like this: zoneSchrink1 = true; publicVariable "zoneSchrink1";
  25. Video here:
×