Little trick for air scenarios
Posted: Wed Jun 05, 2019 2:41 pm
Okay, say you're building a scenario with some aircraft in it and you want to a) Have instant action and b) Let the players choose which loadouts to carry.
Oh boy, Ready times are pretty long and you don't want the player to have to wait 3-6 hours to get the loadout he wants, what do you do? Well, there's a pretty simple answer in the form of Special Actions. Just create a new special action, set it to active and repeatable, and put this as the Lua Script:
But wait, you don't want players to do this all the time! That would be blatant cheating! Well, enter Events. Set a Time Trigger to go off 1 second after the scenario start and create a Lua Script as the Action, namely:
And there you have it, a simple way to give the player choices while not making them have to wait just to get them!
Oh boy, Ready times are pretty long and you don't want the player to have to wait 3-6 hours to get the loadout he wants, what do you do? Well, there's a pretty simple answer in the form of Special Actions. Just create a new special action, set it to active and repeatable, and put this as the Lua Script:
Code: Select all
local carrierorairfield = ScenEdit_GetUnit({side="Your Side", unitname="Your AirBase"})
for i = 1, #carrierorairfield.embarkedUnits.Aircraft do
local currentaircraft = ScenEdit_GetUnit({guid=carrierorairfield.embarkedUnits.Aircraft[i]})
ScenEdit_SetLoadout({UnitName=currentaircraft.name, LoadoutID=0, TimeToReady_Minutes=0})
endBut wait, you don't want players to do this all the time! That would be blatant cheating! Well, enter Events. Set a Time Trigger to go off 1 second after the scenario start and create a Lua Script as the Action, namely:
Code: Select all
ScenEdit_SetSpecialAction({ActionNameOrId='Instant Aircraft Ready Special Event', IsActive=false})And there you have it, a simple way to give the player choices while not making them have to wait just to get them!