Dynamic Pilot Ejection And SAR Rescue (Must have v1.13)

All discussions & material related to Command's Lua interface

Moderators: RoryAndersonCDT, michaelm75au, angster, MOD_Command

angster
Posts: 89
Joined: Mon Oct 12, 2015 10:25 am

Dynamic Pilot Ejection And SAR Rescue (Must have v1.13)

Post by angster »

Have fun guys!


Dynamic Pilot Ejection And SAR Rescue (Must have v1.13 Beta)

1.) Pilots have 60% chance of ejecting

2.) SAR works for all choppers

3.) SAR can only pick up pilots of same side

4.) SAR must be very close to pilot to start rescue

5.) Easy to use, no coding required for adding extra side

Cons:

1.) Cannot pick up pilots of other teams yet

2.) Must keep the Events/Triggers/Actions provided and Neutral side cannot be changed/removed


Updated Attachment with refactored code

10/15/2017 - Updated Pilot Time Limit For Pickup
Attachments
Dynamic Pi.. and SAR.zip
(34.43 KiB) Downloaded 97 times
User avatar
Andrea G
Posts: 327
Joined: Mon Oct 09, 2017 8:48 am
Location: Genoa, Italy

RE: Dynamic Pilot Ejection And SAR Rescue (Must have v1.13)

Post by Andrea G »

Sorry I don't understand.
It's a scenario or the lua code to add the feature?
User avatar
michaelm75au
Posts: 12455
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: Dynamic Pilot Ejection And SAR Rescue (Must have v1.13)

Post by michaelm75au »

The attached file has a scenario that has Lua and events in it. Just be a matter of using the data as a template for including in other scenarios.
Michael
User avatar
Andrea G
Posts: 327
Joined: Mon Oct 09, 2017 8:48 am
Location: Genoa, Italy

RE: Dynamic Pilot Ejection And SAR Rescue (Must have v1.13)

Post by Andrea G »

Thank you Michael.

Suggestion to angster: it would be possible to do a similar script to simulate the rescue of crippled ships?
angster
Posts: 89
Joined: Mon Oct 12, 2015 10:25 am

RE: Dynamic Pilot Ejection And SAR Rescue (Must have v1.13)

Post by angster »

Yup, this scenario takes advantage of the event handling lua functions in 1.13 to simulate SAR pickups. There will be more adjustments but you can definitely use it as a base for future scenarios.

As for crippled ships, it would depend on the scenario. The lua function only cares about the trigger unit and spawns a unit at it's position. It's entirely possible to spawn stranded sailors or life rafts if a ship is damaged or destroyed by changing the event trigger and what the lua script will spawn.
Rory Noonan
Posts: 2418
Joined: Thu Dec 18, 2014 1:53 am
Location: Brooklyn, NY

RE: Dynamic Pilot Ejection And SAR Rescue (Must have v1.13)

Post by Rory Noonan »

Nice work angster!
Image
mikmykWS
Posts: 7185
Joined: Tue Mar 22, 2005 4:34 pm

RE: Dynamic Pilot Ejection And SAR Rescue (Must have v1.13)

Post by mikmykWS »

Very cool! Thanks!

Mike
JPFisher55
Posts: 589
Joined: Sat Nov 22, 2014 7:54 pm

RE: Dynamic Pilot Ejection And SAR Rescue (Must have v1.13)

Post by JPFisher55 »

I don't know anything about LUA. But, I tried implementing these files. I think that I correctly copied everything, but I am getting this error message in the attached saved game.
It may be that the pilot downed in Iranian and I am playing the US. But I thought that the OP may want to take a look.
Attachments
Operation..Promise.zip
(745.61 KiB) Downloaded 11 times
angster
Posts: 89
Joined: Mon Oct 12, 2015 10:25 am

RE: Dynamic Pilot Ejection And SAR Rescue (Must have v1.13)

Post by angster »

Hey Fisher, if you can send me the scenario file. I can take a look at it.
User avatar
Mini_Von
Posts: 141
Joined: Mon Dec 16, 2013 11:14 pm

RE: Dynamic Pilot Ejection And SAR Rescue (Must have v1.13)

Post by Mini_Von »

Hey Fisher,

I think that I fixed your errors. Try this one.
Attachments
Operation..Promise.zip
(706.42 KiB) Downloaded 28 times
User avatar
Mini_Von
Posts: 141
Joined: Mon Dec 16, 2013 11:14 pm

RE: Dynamic Pilot Ejection And SAR Rescue (Must have v1.13)

Post by Mini_Von »

Angster,

Your SAR files are great! Nice job and thank you for sharing.

Rob
JPFisher55
Posts: 589
Joined: Sat Nov 22, 2014 7:54 pm

RE: Dynamic Pilot Ejection And SAR Rescue (Must have v1.13)

Post by JPFisher55 »

I tested the game and still received error message about downed pilot failing for some reason. For all I know it could be working and the error message is wrong.
angster
Posts: 89
Joined: Mon Oct 12, 2015 10:25 am

RE: Dynamic Pilot Ejection And SAR Rescue (Must have v1.13)

Post by angster »

Thanks for the feedback guys. Here's an updated version of it. It includes ships this time but unfortunately some life rafts are destroyed along with the ship. Also some refactoring of the code.
Attachments
DynamicPi..andSAR.zip
(52.27 KiB) Downloaded 31 times
angster
Posts: 89
Joined: Mon Oct 12, 2015 10:25 am

RE: Dynamic Pilot Ejection And SAR Rescue (Must have v1.13)

Post by angster »

Hey Fisher, I'll take a look at it tomorrow. I'm refactoring some code and probably will apply here.

Edit, Here's the Broken Promise scenario with the SAR scripts, enjoy. You will need v1.13 to make it work.
You can adjust the frequency of pilot ejecting by changing the probability setting on Event "Pilot Down". Right now, it's set to 100%
Attachments
Operation .. Promise.zip
(708.71 KiB) Downloaded 27 times
JPFisher55
Posts: 589
Joined: Sat Nov 22, 2014 7:54 pm

RE: Dynamic Pilot Ejection And SAR Rescue (Must have v1.13)

Post by JPFisher55 »

Dear Angster,

I tried again using the scripts, triggers and events in your updated file. Initially it seemed to work, but I just received error message in the attached file.
I'll retest using your recent saved game.
Attachments
Operation..miseSAR2.zip
(689.18 KiB) Downloaded 13 times
JPFisher55
Posts: 589
Joined: Sat Nov 22, 2014 7:54 pm

RE: Dynamic Pilot Ejection And SAR Rescue (Must have v1.13)

Post by JPFisher55 »

Dear Angster;

The Operation Broken Promise game file seems to work. However, when I looked at all the new triggers, I realized that it is unique to that saved game. I'll wait until you have files applicable to any scenario with planes and helicopters.
FWIW, I have only played Operation Broken Promise using 1.13 with database rebuilt.
angster
Posts: 89
Joined: Mon Oct 12, 2015 10:25 am

RE: Dynamic Pilot Ejection And SAR Rescue (Must have v1.13)

Post by angster »

Yeah, gonna be difficult to do that. Best case is use the scen file I provided as a base. I'll probably setup a guide to add SAR to an existing scenario in the future.
User avatar
Mini_Von
Posts: 141
Joined: Mon Dec 16, 2013 11:14 pm

RE: Dynamic Pilot Ejection And SAR Rescue (Must have v1.13)

Post by Mini_Von »

Angster,

To expand on this, what if the pilot turns into a POW if not picked up within a randomized "X" amount of time. Points can be taken away if the pilot is captured. This would add to the sense of urgency to retrieve the pilot.

angster
Posts: 89
Joined: Mon Oct 12, 2015 10:25 am

RE: Dynamic Pilot Ejection And SAR Rescue (Must have v1.13)

Post by angster »

Hmmmm, that can certainly be done. Probably touch up on that in the next update.
User avatar
Andrea G
Posts: 327
Joined: Mon Oct 09, 2017 8:48 am
Location: Genoa, Italy

RE: Dynamic Pilot Ejection And SAR Rescue (Must have v1.13)

Post by Andrea G »

Wonderful work, I'm looking forward to see the guide on how adding the SAR to existing scenarios, I'm thinking about "The Grecale Affair" and the rescue of the stranded sailing boat, so it would be possible to send the chopper to do the work before the nasty tunisians wipe out the helpless crew.
Post Reply

Return to “Lua Legion”