-
Content Count
7316 -
Joined
-
Last visited
-
Medals
-
Medals
Everything posted by pierremgi
-
Teleport players into vehicle
pierremgi replied to Luckyas's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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! -
MP/PVP - Only one side is allowed to respawn
pierremgi replied to allnamesaretakendammit's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
Detect if SEA is within an area
pierremgi replied to randy andy tw1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
On my mind, it's already included in the 5th parameter of the BIS_fnc_findSafePos ! -
Only on Unsung?
-
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.
-
Teleport players into vehicle
pierremgi replied to Luckyas's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You don't need to multiply network exchange: { _x spawn { _plyr = _this; waitUntil {isplayer _plyr}; _plyr moveincargo unit1 } } forEach playableUnits; -
Adding weapon to crate with specific attachments
pierremgi replied to chronicsilence's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Why is it impossible to declare it in description.ext? -
Dialog but Admin only
pierremgi replied to 1para{god-father}'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
Even the BI command admin coming soon! -
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.
-
Variable not appearing in hint
pierremgi replied to daniel1060's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Probably because atm.sqf runs before the game starts (Time>0) or before cash is public. Try a waitUntil {time > 2} in this sqf. -
Syntax seperation help
pierremgi replied to DieselJC's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Personally, I use createLocation. Something like: _location1 = createLocation ["nameLocal", [8200,3850,0], 400, 400]; .... -
Did you link all players to this task?
-
Damage hull and engine after x roadkills
pierremgi replied to Goro's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
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.
-
How to create an objective in arma 3 editor
pierremgi replied to Durcaz's topic in ARMA 3 - TROUBLESHOOTING
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. -
Sliding Gate Script help?!?!?!?
pierremgi replied to natanbrody's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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]; -
Weapon Pool duplicates itself in campaign progress
pierremgi replied to Undeceived's topic in ARMA 3 - MISSION EDITING & SCRIPTING
disregard. answer done when not updated. -
Detect name of player and select the box
pierremgi replied to bullkanox's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
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: