PDA

View Full Version : Question on running Scripts for submissions


klem
09-13-2011, 10:54 AM
It sems that sub-missions can have their own scripts.

If I load such a sub-mission does the original script keep running or is it stopped by the new mission script.

And...

If it does keep running is there a way to stop it, perhaps using the new mission script??

II./JG1_Krupinski
09-13-2011, 08:18 PM
It sems that sub-missions can have their own scripts.

If I load such a sub-mission does the original script keep running or is it stopped by the new mission script.

And...

If it does keep running is there a way to stop it, perhaps using the new mission script??

I may be wrong here so please someone step in and correct me

There is a property of the AMission object called, "MissionNumberListener" that when set to -1, that script will listen to all events of all missions loaded.

I assume that setting this property to the mission number you wish to listen to will isolate the calls.

I haven't messed with it, but I would try something like this.

1. In my main mission, OnBattleStarted set MissionNumberListener = 0. This would set this script to handle events of the main mission.

2. In my very first sub mission of say a flight of He111's flying to England to attack an airfield. OnBattleStarted set MissionNumberListener = 1. This would set the this script to handle the events of this sub mission.

I assume the actions associated with the He111's would be handled in the sub-mission.cs script. And that's because MissionNumberListener = 1.

I'd play around with the numbers, but I "think" that's how it's supposed to work with MissionNumberListener.