Page 1 of 1

If "A" happens, the "B" happens

Posted: Mon Jun 10, 2019 11:39 am
by AdmiralSteve
Hello All,
I'm looking for a way to create a special action where a neutral submarine is on a patrol and is ordered by the player to strike hostile targets with TLAM's and then to return to the patrol. Here's where I'm at with it;

ScenEdit_SetSidePosture('USN Submarine', 'PLAN PLAAF', 'H')

ScenEdit_AssignUnitToMission('USS John Warner SSN785', 'Palawan Strike')

ScenEdit_SetUnit({name='USS John Warner SSN785', guid='924f266e-24e2-436c-b473-5d504ea796c2', depth= '130 FT', moveto=true})

The problem with putting in a 4th line of code with a ScenEdit_AssignUnitToMission script is that the sub surfaces to -130 ft and then immediately returns to the patrol depth. Is their a way to delay the the sub in returning back to the patrol so as to give time for the TLAM's to fire?

Thanks, Steve

RE: If "A" happens, the "B" happens

Posted: Mon Jun 10, 2019 12:41 pm
by Whicker
I think you may need to uncheck the manual depth that you have it set to - since you have the depth set already on the mission you don't need it. I think I may have done that when I was working on it.