Missions (Scenarios) for P3D

Introduction | Why | Missions | Tutorial | FIP

Introduction | FlightCreate | MissionCreate | MissionExpand | MissionComplete ||||| MissionExpand 1 | 2 | 3 | 4 | 5 | 6
Example flight expand (Part5)

After a successful test flight, the first thing to do is to make the areas invisible.
In the POI group, change the DrawStyle of the areas "WP1", WP2", "WP3" and "Geneva" from "Outlined" to "None".

Next, the Scenario-Goal has to be adjusted, because you will land in Geneva without an oil leak.
So switch to the group "Leak" and click on the Goal "LandSafe".
Set Activated to "NO". Change the text to:
"Land safely on an airfield. / Lande sicher auf einem Flugplatz."

Because the Goal is now switched off, it does not appear in the "Kneeboard" under "Scenario". The Goal should only be displayed when an oil leak occurs.
The ideal moment to switch on the Goal is the ObjectActivationAvtion named "LeakText on", click on this action and get the Goal "LandSafe" into the field Referenced under ObjectReferenceList.

Unfortunately, the trigger "Landing Zone" and the Area "Landing Zone" are not suitable for the modified mission.

These are replaced by an "AirportLandingTrigger", found in the Catalog, Triggers.
- Drag the AirportLandingTrigger into the visualization window.
- Give the trigger the name "LandSafe".
- Switch Activated to "NO".
- Under Actions put the GoalResolutionAction named "LandSafeOK" into the Referenced field.

The AirportLandingTrigger wants to know exactly which airports are valid for landing, so you have to define them.

Click on "ADD" under AirportIdent, a new line will be created in the window below, named Airportident 1".

Below the window a new tab is created, named "AirportIdent 1".

Below in the input field "EnterValue" you can enter the AirportIdent.

So you have to add and identify all relevant airports with "ADD".
- Enter at AirportIdent 1 "LSGS" (for Sion)
- At AirportIdent 2 enter "LSGG" (for Geneva)
- At AirportIdent 3 enter "LSGL" (La Blecherette)
(La Blecherette is halfway, so it is a potential emergency landing strip. There are other small landing strips, but I disregard them in this example flight).

To replace the AreaLandingTrigger with the AirpotLandingTrigger, do the following:
- Select the ObjectActivationAvtion named "LeakText on" and put the trigger "LandSave" in the Referenced field.
- So select the unnecessary 2 objects named "LandingZone" and delete them (either by right-clicking, "Delete (2)", or by simply clicking the "Delete" key on the keyboard).

Now select the "LeakText" and rewrite it to:
"Der Motor verliert Öl, lande schnellstens auf einem Flughafen.
The engine is losing oil, land at an airport as soon as possible."
(Be sure to make a line break after the German text).

Select the GoalResolutionAction "LandSafeOK" and the Goal "LandSafe" and duplicate the 2 objects.
- Name the duplicated GoalResolutionAction "LandingInGenfOK".
- Name the duplicated Goal "LandingInGenf". For Activated switch to "YES". For Text write "Land at Geneva airport. / Lande auf dem Flugplatz Genf."

The Goal "LandingInGeneva" is active, in case of an oil leak it must be switched off and the Goal "LandSafe" must be switched on.
- Duplicate the ObjectActivationAvtion with the name "LeakText off".
- Name the duplicate "LandingInGenf off".
- NewObjectState must be set to "DEACTIVATE".
- Under ObjectReferenceList bring the Goal "LandingInGenf" into the field Referenced.
- Under OnCompleteAction bring the ObjectActivationAvtion named "LeakText on" into the field Referenced.

Now select the DelayAction named "10sLeakText on".

Note: The object is visible in the "Leak" group, but it is in the "TimerFailure" group. The object is only visible because it is linked to the ObjectActivationAvtion named "LeakText on".

Now, under OnCompleteAction, bring the ObjectActivationAvtion named "LandingInGenf off" into the Referenced field. (If this object is not in the "Avaiable" list, you have to toggle "Filter by Group" (orange frame).

Now you have to remove "LeakText on" from the Referenced list. Either double-click on it, or select it (1) and click on the red arrow (2).
(Do not select and press "Delete" on the keyboard, because this would delete the object and not only remove it from the Referenced list).

Probably the display has changed to the group "TimerFailure" because the DelayAction is located there.

Switch back to the "Leak" group, the easiest way to do this is to click on the ObjectActivationAvtion named "LandingInGenf off" and right click to select "Find in Visualization".

The Goal "LandingInGenf" must now be switched to "Fulfilled" at the right moment.
For this you need an AreaLandingTrigger, which can be found in the Catalog, Triggers.
-Drag the trigger into the visualization window.
- Name it "LandingInGenfOK".
- Activated must be set to "Yes".
- Under Actions bring the GoalResolutionAction named "LandingInGenfOK" into the Referenced field.
- Under Areas bring the Area "Geneva" into the field Referenced (possibly switch "Filter by Group").

The display has jumped to the group "POI", so select the AreaLandingTrigger and right click "Find in Visualization" to return to the group "Leak".

Select the ObjectActivationAvtion named "LandingInGenf off" and under ObjectReferenceList bring the AreaLandingTrigger named "LandingInGenfOK" into the Referenced field.

What did this change do:
- The Goal "LandingInGenf" is displayed in the kneeboard.
- As soon as an oil leak occurs, this Goal is hidden and the AreaLandingTrigger "LandingInGenfOK" is switched off.
If the AreaLandingTrigger is not deactivated, it activates the Goal "LandingInGeneva" when landing in Geneva, the Goal is displayed (although deactivated) and evaluated as fulfilled. This is not desired, because only the Goal "LandSafe" should be displayed.
- Via OnCompleteAction the Goal "LandSafe" is displayed afterwards.

Change to the group "TimerFailure" in the visualization window.

In order that an oil leak can occur in spite of a gentle flight, a RandomAction is needed, which can be found in Catalog, Actions.
- Drag the RandomAction into the visualization window.
- Name the action "RandomOilLeak WP1".
- For ProbabilityPercent enter "50".


At this point a short explanation about the RandomAction:

- If several objects are listed under "Actions" in the field Referenced and one of these objects should be activated in each case, set "100" for ProbabilityPercent.
(Only one of these objects will be activated. If e.g. 4 objects are listed, each object has 25% chance to be activated).

- If only one object is listed under "Actions", you can set the probability (0 to 100%) with which the action is triggered under ProbabilityPercent.
(In this ExampleFlight only 1 object is used, which should be activated with 50% chance).


Change to the group "Leak".
1) Select the 4 objects "LeakText" and duplicate them.
2) Move the duplicates to the group "TimerFailure".

Rename the 4 objects by removing "- Copy ".
So the new names are:
- "LeakText on 1"
- "10s LeakText off 1"
- "LeakText off 1"
- "LeakText 1"

For the OnScreenText named "LeakText1" you change the text to:
"Der Flughafen Sion ist die nächste Landemöglichkeit.
Drehe um und lande in Sion.
Sion Airport is the nearest landing option.
Turn around and land in Sion."
(Be sure to put a carriage return after each sentence).

Switch to the "POI" group, find the ObjectActivationAction named "WP2 off" and duplicate it.
- Name the duplicate "WP2 Off Emergency".
- Under ObjectReferenceList, put the PointOfInterest named "WP2" in the Referenced field.
- Now move the ObjectActivationAction named "WP2 Off Emergency" into the group "TimerFailure".

Select the ObjectActivationAvtion named "LeakText off 1" and under OnCompleteAction bring "WP2 Off Emergency" into the Referenced field.

Remark:
The difference between "WP2 off" and "WP2 off Emergency", is that:
- "WP2 off" turns off the "WP2", but at the same time, per OnCompleteAction "WP3" is turned on, which is not desired in this case.
-WP2 off Emergency" only switches off WP2.

Duplicate the DelayAction named "20sLeakText off 1" and name the duplicate "20sLeakText on 1".

For OnCompleteAction, bring the ObjectActivationAvtion named "LeakText on 1" into the Referenced field.

Next, an ObjectActivationAvtion is needed, so duplicate an existing one.
- Name the duplicate "OilLeakWP1".
- At NewObjectState switch to "DEACTIVATE".
- For ObjectReferenceList, 5 triggers must be brought into the Referenced field:
"StartTimer"
"<2400RPM"
">2400RPM"
"2min. to Recreation"
"4.5min. to OilLeak"
(This ensures that the oil leak is not triggered a second time.)

- For OnCompleteAction, first bring the FailureAction named "OilLeak" into the Referenced field. Then bring the DelayAction named "20sLeakText on 1" into the Referenced field (the order is important).

Now a ProximityTrigger is needed, so duplicate the existing one, named "StartTimer".
- Name the duplicate "RandomOilLeak WP1".
- For OnEnterAction bring the RandomAction named "RandomOilLeak WP1" into the Referenced field.
- Activated must be set to "YES".
- At Areas bring the Area "WP1" into the field Referenced. (You will be moved to the POI group, so change back to the TimerFailure group).

Select the RandomAction named "RandomOilLeak WP1".
Under Actions, put the ObjectActivationAvtion named "OilLeakWP1" in the Referenced field.

A few things are still missing:
1) First a PointOfInterest at Sion Airport:
- Change the main area to "Prepar3D" and get the PointOfInterest from the Catalog, Scenario into the main window.
- Place the PointOfInterest in the middle of the runway at Sion Airport.
- Name the PointOfInterest "Sion".
- Switch Activated to "NO".
- Write at TargetName "Sion
- Click at AttachedWorldPosition on "EDIT".
- AltitudeAGL must be set to "YES".
- Set Altitude to "0".

2) To turn off the PointOfInterest "Sion" just before landing, we need a RectangleArea, which can be found in the Catalog under Areas:
- Drag the area into the Prepar3D window.
- Name the area "Sion".
- Set Length to "200", Width to 3000 and Height to 200.
- Pitch and Bank must be set to "0".
- Set DrawStyle to None.
- Check if AttachedWorldPosition, EDIT Altitude is set to "0" and AltitudeAGL is set to "ON".
- With Rotate align the area to the runway.

3) The PointOfInterest "Sion" must be switched on:
- Switch the main area to Visualization.
- Duplicate an ObjectActivationAvtion and name the duplicate "Sion on".
- Set NewObjectState to "ACTIVATE".
- For ObjectReferenceList get the PointOfInterest "Sion" into the field Referenced.

4) The PointOfInterest "Sion" must be switched off before landing:
- Duplicate the ObjectActivationAvtion named "Sion on" and name the duplicate "Sion off".
- NewObjectState set to "DEACTIVATE".
- For ObjectReferenceList get the PointOfInterest "Sion" into the field Referenced.

5) The area "Sion" needs a trigger:
- Duplicate a ProximityTrigger and name the duplicate "Sion".
- For OnEnterAction get the ObjectActivationAvtion "Sion off" into the field Referenced.
- At Activated switch to "NO".
- At Areas get the Area "Sion" into the field Referenced.

6) Link the PointOfInterest "Sion" off:
- Select the ObjectActivationAvtion "LeakText on 1" and get the ProximityTrigger "Sion" into the field Referenced at ObjectReferenceList.

7) Turn on the PointOfInterest "Sion" when the oil leak link occurs:
- Select the ObjectActivationAvtion "LeakText off 1" and get the ObjectActivationAvtion "Sion on" into the Referenced field at OnCompleteAction.

Finished it looks like in the picture below. The display can be different, by clicking on the double arrow in the upper right corner, the display is rearranged.
No error must be listed in Validation Output.

Now it is time to test the flight.
- To guarantee that the oil leak is triggered at WP1, set the RandomAction "RandomOilLeak WP1" to "100" under ProbabilityPercent.
- Save the mission and exit SimDirector.
- Open Prepar3D and test the flight.
- After successful test open the flight in SimDirector and set the RandomAction "RandomOilLeak WP1" under ProbabilityPercent again to "50".


Here the current mission for download (with 50% chance of oil leak at WP1).

ExampleFlightExpand5.zip

Continue with part6: Example flight expand (Part6)
I hope you enjoy these flights, if so, please give feedback to p3d@andi20.ch.
Also send error messages (spelling mistakes, wrong information, etc.) to me, I appreciate any feedback.
Introduction | FlightCreate | MissionCreate | MissionExpand | MissionComplete ||||| MissionExpand 1 | 2 | 3 | 4 | 5 | 6

Introduction | Why | Missions | Tutorial | FIP