Page 1 of 1

LUA for simulating boarding (from a helicopter)

Posted: Mon Dec 11, 2023 9:42 pm
by Exilemnord
Could someone point me towards some LUA that would allow me to simulate (trigger, really)a boarding of a ship by helicopter born infantry? I can't use the proximity reference points as the targeted ship begins in a port (so can't set them up.) Just need the trigger to go off when the helicopter is very close to the ship (and maybe some advice on a flight plan that would send the helo directly over the ship.) Once it triggers I can write the rest of the script (changing sides and headed to a new port etc.) Thanks

Re: LUA for simulating boarding (from a helicopter)

Posted: Tue Dec 12, 2023 10:28 am
by KLAB

Re: LUA for simulating boarding (from a helicopter)

Posted: Tue Dec 12, 2023 10:40 am
by blu3s
Use a trigger of units remains in area or unit enters area, with an area that is relative to the ship (you'll need to create this RP in the ship's side but there's no problem regarding the trigger). When the trigger fires, you can check if the unit is your helicopter and perform the rest of actions

Re: LUA for simulating boarding (from a helicopter)

Posted: Tue Dec 12, 2023 1:07 pm
by Exilemnord
Thank you Klab.

Blu3s. Can't use proximity reference points as the ship begins in port.

Re: LUA for simulating boarding (from a helicopter)

Posted: Tue Dec 12, 2023 2:43 pm
by blu3s
Mmm sets an event on UnitStatus change to generate on the fly these RPs, also you can check the status of any of your units using unit.condition so a regular 1min trigger to check the status of the ship and create the RP's and delete this event could also address the issue

Re: LUA for simulating boarding (from a helicopter)

Posted: Tue Dec 12, 2023 8:27 pm
by Parel803
Good evening,

I believe Apache (Rory) had somthing like this in his 'Seventh District Vice' scenario.

best regards GJ