4K.Scar 3 Posted May 6, 2017 (edited) Hello, Im extremely new to the trigger side of the editor, hope I can still post here.. I want a squad to hold until a helicopter arrives, at which point they load into it, after thats done the helicopter proceeds to a waypoint. How do I do that? Please keep it as simple as possible... no scripts.... PS. any simple tutorials you recommend? Edited May 10, 2017 by 4K.Scar Solved Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted May 6, 2017 No triggers needed. Give the squad a get in waypoint, give the chopper a load waypoint. Click the get in waypoint with RMB -> Connect ->Set waypoint activation or whatever it's called connect it to the load waypoint. Might need to connect the get in waypoint with the chopper but all in all that should do it. Cheers 1 Share this post Link to post Share on other sites
4K.Scar 3 Posted May 6, 2017 Just now, Grumpy Old Man said: No triggers needed. Give the squad a get in waypoint, give the chopper a load waypoint. Click the get in waypoint with RMB -> Connect ->Set waypoint activation or whatever it's called connect it to the load waypoint. Might need to connect the get in waypoint with the chopper but all in all that should do it. Cheers Helicopter wont land, even with a heli pad. Share this post Link to post Share on other sites
7erra 629 Posted May 6, 2017 Okay do the following steps in the editor: HELICOPTER: Place a helipad GIve your helicopter a waypoint "LAND" near the helipad Put this in the "CONDITION" of the waypoint: count ((crew vehicle this) -thisList) == count units (group player) Place the next waypoint where the helicopter has to move to INFANTRY: Place a "MOVE" waypoint Sync it to the "LAND" waypoint Right click on the "MOVE" waypoint >> Connect >> Set Waypoint Activation Click on the "LAND" waypoint (!not vice versa!) Place a "GET IN" waypoint directly on the helicopter DONE Share this post Link to post Share on other sites
pierremgi 4903 Posted May 7, 2017 Grumpy Old Man code works in vanilla Arma. It's simple and efficient: GETIN waypoint for squad LOAD for helo, link between the 2 waypoints. That's all. No need to place an helipad on rather flat and empty terrain. If not, helo can land hundred meters away, but land. On the other hand, helo group (crew) must have no enemy insight. If some enemies, its behavior grows up for combat mode and good luck for landing! You can force the helo group (not a squad) to CARELESS. It's better for fast support. Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted May 7, 2017 This would even be easier using scripts. Since the thread starter stated he doesn't want scripts he won't get one unless he's changing his mind of course. It's stuff like that that actually got me into scripting in the first place, seeing how much easier it is instead of having to place a plethora of triggers, waypoints, sync them and whatnots, a few scripted lines will suffice. Cheers 1 Share this post Link to post Share on other sites
Tankbuster 1747 Posted May 7, 2017 2 hours ago, Grumpy Old Man said: This would even be easier using scripts. Since the thread starter stated he doesn't want scripts he won't get one unless he's changing his mind of course. It's stuff like that that actually got me into scripting in the first place, seeing how much easier it is instead of having to place a plethora of triggers, waypoints, sync them and whatnots, a few scripted lines will suffice. Cheers ^^^^ _this Share this post Link to post Share on other sites
4K.Scar 3 Posted May 7, 2017 7erra's solution works, except the helicopter doesn't wait for the squad to get in. Do I have to edit the condition he gave me? I am willing to see your way of doing things, @Grumpy Old Man, using scripts, the reason I wanted to use triggers and waypoints is because it's easier to remember if I try to do it again or in a slightly different way. PS. Please give me a simple tutorial/guide or where to start learning these kind of things, I would like to make my missions a little more fun Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted May 8, 2017 Good collection of links, also take a look at the stickies, lots of information there. You can put this inside a trigger when the chopper should pick up the group or in a waypoints on activation field. Waypoints for group and chopper will be locked until the boarding is complete: TAG_fnc_groupBoardChopper = { params [["_chopper",objNull],["_group",objNull],["_debug",true]]; group driver _chopper lockWP true; _group lockWP true; _chopper move getposatl leader _group; if (_debug) then {systemchat "Chopper moving to group"}; waituntil {sleep 1;_chopper distance2d leader _group <= 300 OR (!alive _chopper OR {alive _x} count units _group isequalto 0)}; if ((!alive _chopper OR {alive _x} count units _group isequalto 0)) exitWith {if (_debug) then {systemChat "Chopper or group dead, aborting function"}}; dostop _chopper; _chopper land "Get In"; if (_debug) then {systemchat "Chopper landing"}; waituntil {sleep 1;((getposatl _chopper) select 2) < 2 AND speed _chopper < 3 OR (!alive _chopper OR {alive _x} count units _group isequalto 0)}; if ((!alive _chopper OR {alive _x} count units _group isequalto 0)) exitWith {if (_debug) then {systemChat "Chopper or group dead, aborting function"}}; sleep random [1,2,3]; {_x assignAsCargo _chopper;} foreach units _group; units _group orderGetIn true; units _group allowGetIn true; waituntil {sleep 1;{_x in crew _chopper} count units _group isequalTo count units _group OR (!alive _chopper OR {alive _x} count units _group isequalto 0)}; sleep random [1,2,3]; if ((!alive _chopper OR {alive _x} count units _group isequalto 0)) exitWith {systemChat "Chopper or group dead, aborting function"}; if (_debug) then {systemchat format ["Chopper boarded, continuing to next waypoint"]}; _chopper land "NONE"; _chopper move getposatl _chopper; group driver _chopper lockWP false; _group lockWP false; }; _test = [chopper,mygroup] spawn TAG_fnc_groupBoardChopper; To deactivate the debug messages simply turn the last parameter in the first line to false. Cheers Share this post Link to post Share on other sites
4K.Scar 3 Posted May 8, 2017 Hello, thanks for the reply, here is the situation I did EVERYTHING exactly like 7erra said, but instead used your code on step 3. (I didnt change anything in your code) When the helicopter lands, in chat it says "Chopper or Group dead, aborting function", and just proceeds to the next waypoint. Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted May 8, 2017 Then either the chopper is dead or no one in the group is alive. Cheers Share this post Link to post Share on other sites
4K.Scar 3 Posted May 8, 2017 Just now, Grumpy Old Man said: Then either the chopper is dead or no one in the group is alive. Cheers I think I would notice that :P I now also saw that the chopper doesnt go to the next waypoint, it instead starts flying towards it, but the "Get In" symbol that was on top of it changed to "Stop", at which point it comes back, lands, waits for us to get in, and proceeds to the next waypoint. Note that Im in a group of 3 soldiers, and I'm not the leader, and no enemies nearby. Also the driver of the chopper has the following lines. this setBehaviour "CARELESS"; this disableAI "AUTOCOMBAT"; this disableAI "CHECKVISIBLE"; Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted May 8, 2017 You don't need any special waypoint set. Just place a few move waypoints and put my code into one of them, upon reaching that waypoint the code will start. No need for Get In waypoints or whatever. Make sure you named the group and chopper accordingly. The script exits when the vehicle chopper is dead or no more alive units inside the group. Either that or you didn't name the groups properly. Cheers Share this post Link to post Share on other sites
4K.Scar 3 Posted May 8, 2017 Just now, Grumpy Old Man said: You don't need any special waypoint set. Just place a few move waypoints and put my code into one of them, upon reaching that waypoint the code will start. No need for Get In waypoints or whatever. Make sure you named the group and chopper accordingly. The script exits when the vehicle chopper is dead or no more alive units inside the group. Either that or you didn't name the groups properly. Cheers Removed the get in waypoint, and named my group "_group" and the chopper "_chopper" didnt work, or do I have to name them something like group1 and then replace every "_group" in your code with group1? Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted May 8, 2017 That's why it's always good to post an example how you tried to make it work. Variables with an underscore are local variables and don't exist outside the scope they have been defined in. To make it a bit more clear: Put this inside init.sqf: TAG_fnc_groupBoardChopper = { params [["_chopper",objNull],["_group",objNull],["_debug",true]]; group driver _chopper lockWP true; _group lockWP true; _chopper move getposatl leader _group; if (_debug) then {systemchat "Chopper moving to group"}; waituntil {sleep 1;_chopper distance2d leader _group <= 300 OR (!alive _chopper OR {alive _x} count units _group isequalto 0)}; if ((!alive _chopper OR {alive _x} count units _group isequalto 0)) exitWith {if (_debug) then {systemChat "Chopper or group dead, aborting function"}}; dostop _chopper; _chopper land "Get In"; if (_debug) then {systemchat "Chopper landing"}; waituntil {sleep 1;((getposatl _chopper) select 2) < 2 AND speed _chopper < 3 OR (!alive _chopper OR {alive _x} count units _group isequalto 0)}; if ((!alive _chopper OR {alive _x} count units _group isequalto 0)) exitWith {if (_debug) then {systemChat "Chopper or group dead, aborting function"}}; sleep random [1,2,3]; {_x assignAsCargo _chopper;} foreach units _group; units _group orderGetIn true; units _group allowGetIn true; waituntil {sleep 1;{_x in crew _chopper} count units _group isequalTo count units _group OR (!alive _chopper OR {alive _x} count units _group isequalto 0)}; sleep random [1,2,3]; if ((!alive _chopper OR {alive _x} count units _group isequalto 0)) exitWith {systemChat "Chopper or group dead, aborting function"}; if (_debug) then {systemchat format ["Chopper boarded, continuing to next waypoint"]}; _chopper land "NONE"; _chopper move getposatl _chopper; group driver _chopper lockWP false; _group lockWP false; }; Then name the chopper MyChopperName. In the squad group leaders initfield: MyGroupName = group this; Then wherever you want to spawn the code, may it be waypoint or trigger: _test = [MyChopperName,MyGroupName] spawn TAG_fnc_groupBoardChopper; Cheers Share this post Link to post Share on other sites
4K.Scar 3 Posted May 8, 2017 Alright so nothing worked, Im sure Im doing something wrong, but regardless, I made myself a workaround/solution. The helicopter: Has 2 waypoints, a land, and a move after that. The squad: Has a move, that's synced with a trigger that activates once the helicopter is inside the trigger area, after it triggers the squad is told to get in the heli, before it lands, which gives them time to tell the heli to stop and wait for them to get in. Basically the squad gave orders to the helicopter which makes this all work. I dont know if it would work if I was the leader. (The heli and the squad are 2 different groups so I dont even know how they can give orders) PS. It seems the group doesnt give the stop order to the heli if they are "Careless" or with enemies in sight Scratch all that, it's inconsistent as hell, I found another solution, sync the land waypoint to the get in waypoint. Thanks for your effort guys Share this post Link to post Share on other sites
Posenpaul 6 Posted May 10, 2017 If this is only squad on server and a coop mission and you don't want to work with GetIn waypoint you can sync(SetWaypointActivation not normal sync) land waypoint with a trigger. Trigger 0,0,-1 and no activation, but in condition line: {(alive _x) && (_x in heli1)} count (playableUnits + switchableUnits) == {alive _x} count (playableUnits + switchableUnits) This will count all alive players + playable KI chars in Helicopter and compare it with all alive players + playable KI chars Land waypoint will be not completed before this is true, Helicopter will not start before all units in helicopter. Share this post Link to post Share on other sites
Savage_Donkey 243 Posted May 10, 2017 On 5/8/2017 at 9:29 AM, 4K.Scar said: sync the land waypoint to the get in waypoint Do you mean sync or set waypoint activation? I've been suffering from the same problem, but I have no 'sync' option available under connect. Share this post Link to post Share on other sites
pierremgi 4903 Posted May 10, 2017 2 hours ago, Savage_Donkey said: Do you mean sync or set waypoint activation? I've been suffering from the same problem, but I have no 'sync' option available under connect. In editor, between 2 waypoints, there is just one solution: "set waypoint activation". Difficult to test something else. Share this post Link to post Share on other sites
Savage_Donkey 243 Posted May 10, 2017 4 hours ago, pierremgi said: In editor, between 2 waypoints, there is just one solution: "set waypoint activation". Difficult to test something else. I know there are only two options currently, but I could've sworn you used to be able to sync waypoints... EDIT: Oops, one option, don't know what I was thinking. Share this post Link to post Share on other sites
pierremgi 4903 Posted May 10, 2017 1 hour ago, Savage_Donkey said: I know there are only two options currently, but I could've sworn you used to be able to sync waypoints... 2 options? My Eden is broken. If you script use synchronizeWaypoint (a bit confusing). Share this post Link to post Share on other sites
4K.Scar 3 Posted May 10, 2017 1 hour ago, Savage_Donkey said: I know there are only two options currently, but I could've sworn you used to be able to sync waypoints... Yes I meant set waypoint activation, sorry. Share this post Link to post Share on other sites