-
Content Count
4792 -
Joined
-
Last visited
-
Medals
-
Medals
-
Everything posted by pierremgi
-
waituntil units spawn before counting them?
pierremgi replied to sabot10.5mm's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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) } }; -
Water scooter waypoints not working?
pierremgi replied to M1ke_SK's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
Syncing Waypoints?
pierremgi replied to Savage_Donkey's topic in ARMA 3 - MISSION EDITING & SCRIPTING
It's same. Just test it. -
Trigger script not working correctly in MP
pierremgi replied to Luckyas's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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- 35 replies
-
Arma 3 A trigger must be triggered when a Independant soldier shoots
pierremgi replied to Crimson Mage's topic in ARMA 3 - MISSION EDITING & SCRIPTING
{_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. -
Trigger script not working correctly in MP
pierremgi replied to Luckyas's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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";- 35 replies
-
mgi missions [SP/MP 32 COOP] LINGOR OPS RETALIATION
pierremgi replied to pierremgi's topic in ARMA 3 - USER MISSIONS
Video here: -
most grenades from mods dont work/register
pierremgi replied to eeeeaa's topic in ARMA 3 - TROUBLESHOOTING
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. -
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.
-
Protection zone with a trigger
pierremgi replied to reapertitanium's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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.- 15 replies
-
- 1
-
-
- protection
- zone
-
(and 4 more)
Tagged with:
-
Protection zone with a trigger
pierremgi replied to reapertitanium's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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!" } }];- 15 replies
-
- protection
- zone
-
(and 4 more)
Tagged with:
-
Editing other missions to use your own desired post processing preset ?
pierremgi replied to truffleshuffle's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
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.
-
Exploding vehicles since Arma 3 1.68
pierremgi replied to GrossKopfZed's topic in ARMA 3 - TROUBLESHOOTING
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... -
Basic script to buy and spawn an object
pierremgi replied to daniel1060's topic in ARMA 3 - MISSION EDITING & SCRIPTING
SQS SQF and some other good links like this one (2010!). -
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.
-
Basic script to buy and spawn an object
pierremgi replied to daniel1060's topic in ARMA 3 - MISSION EDITING & SCRIPTING
... then { [] exec "not_enough.sqs" } ... I can't imagine some guys are still using sqs instead of sqf... -
Adding Rating to Players on Enemy Kills
pierremgi replied to pliskin124's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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; } }; -
The Unsung Vietnam War Mod 3.0D - Delta Released !!!
pierremgi replied to sgt_savage's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Wow, thanks for these answers. -
Starting mission with vehicle in cargo
pierremgi replied to Cryptdik's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You could use setSlingload instead. In chopper init field: this setSlingLoad car1 should work.- 1 reply
-
- 1
-
-
[Tutorial] The Randomize Function
pierremgi replied to MrCrazyDude115's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
MP/PVP - Only one side is allowed to respawn
pierremgi replied to allnamesaretakendammit's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
Tutorial: How to make an object play sound or music? (Radio_FM)
pierremgi replied to avengerarts's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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). -
Say3D / Say / PlaySound3D - Volume and Distance ?
pierremgi replied to R34P3R's topic in ARMA 3 - MISSION EDITING & SCRIPTING
wrong place! -
with profileNameSpace do { if (isNil "popup") then { your popup code here}; popup = true };

