thirith 27 Posted September 5, 2016 I'm currently working on a helicopter pickup mission. As the player is supposed to pickup several units, I'm hoping to get around assigning waypoints on the helicopter for all of them, as this becomes pretty messy in the 2D editor (several waypoints on the same unit). What I'm thinking of doing is create a trigger once the helo enters the target region, putting assignAsCargo and orderGetIn code for the unit in question in the initialisation box. My question is this: how does a unit behave if it's given an orderGetIn command but the vehicle in question is still up in the air? Will it wait until the helicopter has landed and then get in? Second, and secondary, question: does orderGetIn generally work better than a "Get In" or "Get In Nearest" waypoint? Using the waypoint method, I find that the AI tends to make quite a detour before boarding the helicopter. Share this post Link to post Share on other sites
beno_83au 1362 Posted September 5, 2016 In your trigger's condition field (assuming the trigger activates once the player's helo is present within the trigger), you could use something like: Condition: this && (((getPos vehicle player) select 2) < 5) This will activate the trigger once the player's helicopter is within the trigger AND below 5m, which would mean the group waiting to board wouldn't get the assignAs and orderGetIn until you're about to land. That should work reasonably well for SP. Share this post Link to post Share on other sites
thirith 27 Posted September 5, 2016 That's a good tip, thanks. I might test both; if orderGetIn gets the unit to start running towards the helicopter, I might leave it in, since it tends to make the unit more visible, and some of the pickups might be in between buildings. ... actually, I'm just thinking: it might be more fun for this particular mission if getting close enough to the unit to be picked up triggered a smoke grenade. Off to look for info on scripted smoke grenades! Share this post Link to post Share on other sites
beno_83au 1362 Posted September 5, 2016 https://community.bistudio.com/wiki/createVehicle For "type" use "smokeShell", "smokeShellGreen", "smokeShellRed", etc...... Share this post Link to post Share on other sites
thirith 27 Posted September 6, 2016 Thanks, that's the one I tried this morning. I used createVehicleLocal, though, since the mission's basically a multiplayer race (who picks up four passengers first and then returns to base?). As far as I understand, there's a risk with createVehicle that it's enacted on the server as well as on each client. Then again, I guess multiple smoke grenades are better than multiple tanks or OpFor units... :) In any case, the smoke grenade thing works pretty well, and I expect it might work quite nicely with two-player teams - pilot and co-pilot spotter, keeping an eye out for a plume of smoke. Share this post Link to post Share on other sites
beno_83au 1362 Posted September 6, 2016 Run it on the server only to avoid having every client spawn in a smoke grenade. There's a couple of ways to do it (using remoteExec to run a script file on the server only would be a good one), but a good failsafe to include at the start of a script is a server check that exits the script if it's not being run on the server: if (!isServer) exitWith {}; //createVehicle script That'll force the script to close before running the rest of the code if anyone other than the server executes it. I've never played around with createVehicleLocal so i can't comment with any certainty, but if the comments on the wiki are still correct then it could work for smoke grenades. Share this post Link to post Share on other sites
thirith 27 Posted September 6, 2016 Yeah, I'd imagine that with a unit or vehicle that players interact with, I'd have to just do it on the server; with a smoke grenade, it just matters that everyone gets the same effect in the same place more or less at the same time. If I understand correctly, remoteExec is Arma 3 only, and I'm currently doing this for A2/OA. It's good to hear they've made these things easier in A3, though. Share this post Link to post Share on other sites
beno_83au 1362 Posted September 6, 2016 Lol, sorry, i didn't even realise this was for A2. But yes, for anything created with createVehicle (even smoke grenades) just be sure to run it once. Everyone would still see the effects. Share this post Link to post Share on other sites