LUA to change submarine depth
Posted: Sun Jun 09, 2019 12:03 pm
I have this small script that changes the depth of a submarine as it changes missions from patrol to land attack;
ScenEdit_SetSidePosture('USN Submarine', 'PLAN PLAAF', 'H')
ScenEdit_SetMission('USN Submarine','USS John Warner SSN785 Patrol',{stationDepthSubmarine=-30})
ScenEdit_AssignUnitToMission('USS John Warner SSN785', 'Palawan Strike')
What I can't figure out is after the submarine is assigned to 'Palawan Strike', it settles back down below launch depth and the TLAM's cannot launch. Any suggestions? Scenario is attached.
Thank you,
Steve
ScenEdit_SetSidePosture('USN Submarine', 'PLAN PLAAF', 'H')
ScenEdit_SetMission('USN Submarine','USS John Warner SSN785 Patrol',{stationDepthSubmarine=-30})
ScenEdit_AssignUnitToMission('USS John Warner SSN785', 'Palawan Strike')
What I can't figure out is after the submarine is assigned to 'Palawan Strike', it settles back down below launch depth and the TLAM's cannot launch. Any suggestions? Scenario is attached.
Thank you,
Steve