Need help with setting up downed pilot script.

Post bug reports and ask for game support here.

Moderator: MOD_Command

Post Reply
weezerluver2
Posts: 2
Joined: Mon Apr 22, 2024 7:25 pm

Need help with setting up downed pilot script.

Post by weezerluver2 »

I’ve never messed around with the events editor and don’t know how to have it spawn a downed pilot or stranded personnel unit when a aircraft is lost. Can anyone teach me? thanks. I have attached an image of what I've done so far, I'm copying the script from a different scenario. Image
weezerluver2
Posts: 2
Joined: Mon Apr 22, 2024 7:25 pm

Re: Need help with setting up downed pilot script.

Post by weezerluver2 »

Ok, i figured out part of the problem. Im making a scenario using CWDB, and the LUA im copying is from DB3K. I still dont know what to write now though.
User avatar
lumiere
Posts: 286
Joined: Tue Mar 19, 2019 10:38 am

Re: Need help with setting up downed pilot script.

Post by lumiere »

Please note that to get user defined function (="original" function that is not listed in Command Lua document) to work, you have to declare the function first, usually when scenario is loaded.

Looks like finction is taken from some of Gunner's Med Fury scenario. So, please check event named "Event - Load all Functions". This event, triggered every time scenario is loaded, will decleare all functions used in scenario.

Functions are included in Event action "Action - Load all Functions" Lua script. Copy & paste all script text to text editor, then find the function named CreateDownedPilotFromTriggerUnit(triggerUnit). As this function itself references another user defined functions (and they as well references the other...), you need other functions too.

Again paste all script text for event action that will be fired when scenario is loaded. Note this event is separate from Downedpilot ejection event that will actually run the function.

Asking Gunner (author of epic Fury series) or Whicker (original (revised) script author) will be best to understand how function works, but I could say some notes:
-You will need side named "Marker" to generate RPs for SAR event.
-Your note about using separate DBID for CWDB/DB3K scenario is right. There is ScenEdit_AddUnit() first part of the function, so replace DBID to corresponding one.
"How Do You Stay Calm With A 7,000 Ton Nuclear Predator Listening For Your Heartbeat?"
My Lua garbages (Github)
Post Reply

Return to “Tech Support”