Jump to content

pierremgi

Member
  • Content Count

    4792
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by pierremgi

  1. 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) } };
  2. 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.
  3. pierremgi

    Syncing Waypoints?

    It's same. Just test it.
  4. 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
  5. {_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.
  6. 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";
  7. Video here:
  8. You can check your files integrity on Steam arma properties local files. If no improvement, I suggest you to disable all mods, then re-enable them one by one. Normally, APEX vanilla (of course), RHS, CUP, UNSUNG DELTA are working fine with grenades. So, you should have another mod which put the mess with the "throw" muzzle. Never keep activated all mods at a time! Configure your launcher to load the minimum mandatory mods, + one or two light ones like enhanced movements or mag repack.
  9. You can't. There is no simple way to fill a polygon. If you're skilled for mathematics, try to include rectangular shaped markers. But, it's CPU consuming.
  10. pierremgi

    Protection zone with a trigger

    So, players on foot or in vehicles. Just adjust the condition to your three triggers. Place this code in init.sqf or even any trigger, activated of course. This code doesn't prevent a shot by a unit inside the area, just preventing players firing when in the area. You can adapt this for a sanctuary: 0= [] spawn { while {true} do { sleep 2; { if !(_x getVariable ["MGIttd",false]) then { _x setVariable ["MGIttd",true]; _x addEventHandler ["firedman", { _shooter = _this select 0; _projectile = _this select 6; _target = if (isplayer _shooter) then [{cursorTarget},{ assignedTarget _shooter}]; call { if (_projectile inArea trigger1 or _projectile inArea trigger2 or _projectile inArea trigger3) exitWith { deleteVehicle _projectile; if (isPlayer _shooter) then { "Don't fire inside the base!" remoteExec ["hintC",_shooter] } }; if (_target inArea trigger1 or _target inArea trigger2 or _target inArea trigger3) exitWith { deleteVehicle _projectile; if (isPlayer _shooter) then { "Don't fire inside the base!" remoteExec ["hintC",_shooter] } }; [_shooter,_projectile] spawn { params ["_shooter","_projectile"]; waitUntil {_projectile inArea trigger1 or _projectile inarea trigger2 or _projectile inArea trigger3 or isnull _projectile}; if (!isNull _projectile) then { deleteVehicle _projectile; if (isPlayer _shooter) then { "Don't fire inside the base!" remoteExec ["hintC",_shooter] } }; }; }; }] } } forEach allUnits; } }; With this code, even a sniper or an artillery shooting from a remote position, to units inside the bases (triggers areas), can't hurt anybody. As the projectile is delete crossing the area, don't expect firing at an enemy at the opposite location of you through the base.
  11. pierremgi

    Protection zone with a trigger

    3 areas? Let's say triggers or markers Something like: player addEventHandler ["firedman", { _plyr = _this select 0; _projectile = _this select 6; if (_plyr inArea "marker1" or _plyr inArea trigger1) then { deleteVehicle _projectile; hintC "Don't fire inside the base!" } }];
  12. You can do a little addon, post-processing whatever mission you want, as far as the server (for MP) let you run some addons. Post-processing is local. Some addons already exist here... and here. For Zeus, I don't have the answer. I never use it.
  13. pierremgi

    Working with Tasks

    Conditional trigger2 with trigger1 in onact of trigger2: this && triggerActivated trigger1 Use task state modules for tasks modules. For script: _tsk1 = ["task1", true, ["your title here","task description here",""],nil, "ASSIGNED", 0, true, true,"",true] call BIS_fnc_setTask; waitUntil {something true}; [_tsk1,"Succeeded",true] call BIS_fnc_taskSetState; Good luck with tasks ids. That can be weird.
  14. pierremgi

    Exploding vehicles since Arma 3 1.68

    Welcome! https://feedback.bistudio.com/T124183 https://feedback.bistudio.com/T120705 https://feedback.bistudio.com/T80347 https://feedback.bistudio.com/T78654 https://feedback.bistudio.com/T124082 and others...
  15. SQS SQF and some other good links like this one (2010!).
  16. pierremgi

    Flags problem

    remoteExec on <this> PC is totally weird. It seems to me that the flag is local to the server. so <this> has no more sense than no remote execution. But the question is not here! setFlagTexture is EG So no need to remoteExec it! You might have a jpg format issue. Test it with one of these textures.... or open a ticket on BI feedback if no result.
  17. ... then { [] exec "not_enough.sqs" } ... I can't imagine some guys are still using sqs instead of sqf...
  18. No need to "detect" somebody. allUnits is all units. If you're spawning units, especially enemies, allUnits must be updated to add (set) a variable with the side of the unit when alive. Why? Because, when dead, all units are civilian. In other words, in init.sqf, or in a script run by everyone, or in a trigger set to true: 0 = [] spawn { while {true} do { sleep 2; { if (isNil {_x getVariable "oldside"}) then { _x setVariable ["oldSide",side _x]; } } forEach allUnits; } };
  19. You could use setSlingload instead. In chopper init field: this setSlingLoad car1 should work.
  20. pierremgi

    [Tutorial] The Randomize Function

    Easy to check in debug console. write your script, click on the little chrono instead of exec. note the iteration time, compare with the alternate script.
  21. pierremgi

    MP/PVP - Only one side is allowed to respawn

    you are in MP, so you should try bis_fnc_endMissionServer instead. As far as you want to end when the 2 bluefor are dead, make it simple. initialize a global variable: counter = 0; add in EH respawn counter = counter + 1; There is no reason to get the same player respawning twice, so, when counter == 2, make your mission end (for 2 blufor players). 0r, in case of 1 blue JIP only: counter == blufor countSide allPlayers. Alternate solution: If you don't have any civilian in game, make captive blufor on respawn (just add player setCaptive true; in the respawn code above. The respawned player will definitely not belong to west anymore. Then your trigger just have to check the number of blufor players: blufor countSide allPlayers == 0 NB: triggers considerations: - blufor units are blufor, player or not, until you kill them or capture them. On respawn process, the side of a player will be west, civilian (when dead), then west again when respawned. So, different phases for blufor countSide allPlayers, but 2 most of the time, - thislist works in on activation only, and is not refreshed until you deactivate the trigger. So, for example, count thislist, if 2 blufor are in a big trigger area for blufor presence, will return 2... and that's all until the 2 players are killed at the same time: No more blufor in area will deactivate the trigger, then the first respawned guy will reactivate the trigger and thislist will return 1., etc.
  22. In multiplayer, don't forget to remoteExec say3D. And here is the very good point of this command: you just need relative path (or class in cfgSounds). NB: playSound3D is limited by the need of an absolute path for finding the sound. This fails in some cases whatever method you intend to extract the "mission root" (just because the returned path sometimes looks like _curMPmission.yourworld, instead of something like c:\users\...\arma3 - other Profiles\mpmissions\yourmission.yourworld).
  23. pierremgi

    profilenamespace???

    with profileNameSpace do { if (isNil "popup") then { your popup code here}; popup = true };
×