• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSXME proximity trigger on enter conditions

Messages
112
Country
unitedkingdom
i'm trying to add conditions to my proximity trigger so it detects if i'm at a cirtain bank angle for example. i'm just starting with simply logic until i figure it out.

so in my proximity trigger, i set an OnEnterConditions of [Bank] > 45

so when i fly through at a bank angle of greater than 45, nothing happens, no trigger. what am i doing wrong here?

thx
 
Interesting.

I assume the area is correctly set, especially for altitude - AGL or MSL (that gets me every time.)

I assume your Proximity trigger is set up thusly:

Activated: True (or has something that will set it to true)
OneShot: True or false - doesn't matter
ObjectFilter: User
OnEnterFilter: (0 refs)
OnExitFilter: (0 refs)
OnEnterCondition" [Bank] > 45
OnEnterAction: - whatever action
OnExitCondition:
OnExitActions: (0 refs)
Areas: - your area
IsGlobal: False

and that the Bank angle is set to "degrees" on the left side of the condition statement.


If so, it should work

That said you could try this:

Activated: True (or has something that will set it to true)
OneShot: True or false - doesn't matter
ObjectFilter: Reference <- from the drop down menu
OnEnterFilter: [Player] <- the +P button
OnExitFilter: (0 refs)
OnEnterCondition" [Bank] > 45
OnEnterAction: - whatever action
OnExitCondition:
OnExitActions: (0 refs)
Areas: - your area
IsGlobal: False

The only other alternative - not as elegant - is to string together a proxy trigger with an inactivated property trigger - i.e. [Proximity Trigger] - > [Activate Node (set to true)] - [Property Trigger (Active set to false)([Bank>45])] - > whatever the action.

The issue with doing it the "hard way" is that you will have to set up the OneShot fields properly to achieve what you want. So if you will allow the "flyer" more than one chance to try to fly through the area at 45º Bank, then the proximity trigger oneshot needs to be false. The property trigger oneshot can be true or false depending on what your final action is - i.e. adding to a counter, one shot would be false. However, if it is a "One Attempt Only" deal then the initial proximity trigger onset is True.

If neither of these works, let me see how you have the Proximity trigger and Area are set up.

Cheers
 
Great video! I assume ORBX Yosimite scenery?

I also get that error message when trying to grab coordinates - seems to happen when FSXME has been hidden for a while while FSX is running. Like you did, try again and it works the second time.

Interesting fact about having to set the one shot to false to get the proxy trigger with a condition to work correctly. I did not know that…explains an issue I once had…evidently once you trip the proxy area, it considers the trigger tripped even though the condition was not met.

This video shows some of the mission work I'm doing for a product called a "simNovel" - essentially a series of missions tied to an (hopefuly) interesting novel - the reader/flyer uses the missions to advance the plot.


Good luck with your mission - looks like fun!
 
Here's a list of "gotchas" from fsxmissionshangar.com. Check it out for many more tips.
- Unlike Property Triggers, conditions associated with a Proximity trigger are STATIC. i.e. If conditions are NOT met when entering Area Definition, then trigger does NOT fire, even though conditions are met later while still in the Area.
- When reverse engineering Trigger Conditions, ALWAYS check your ObjectReference in the XML file FIRST! If you open the Condition Editor, your ObjectReference will ALWAYS automatically change to USER. Thus IF a triggering object, other than USER, was specified, then you will never know it, assuming you do a "Save" after closing the window!
- If you have 2 PxTs (1shot) associated with the same RA and set for different conditions, either trigger firing will disable the other. This can be rectified by reactivating BOTH PxTs AND the RA, with the firing trigger. Setting both triggers for multi-fire will also solve this problem.
- Take particular care with PxTs AFTER they are written. Entering the window panes to inspect "Conditions" or "Actions", will write "empty" header and trailer to your xml file. IF you then save your mission, these empty header/trailers are saved, which WILL prevent your xml mission file from loading.
To correct, simply delete:
<OnExitActions>
</OnExitActions>
and your problem is solved!
- Entering a RA, whose PxT is deactive, will trigger firing when PxT is reactivated, IF object is inside the RA.
- However, the opposite does NOT occur...Exiting a RA, whose PxT is deactive, will NOT trigger firing when PxT is reactivated, even though object remains outside of the RA.
- When referring to an AI Object in the Condition Editor as a String, make sure your string is EXACTLY as specified in the title on the SimObjects\folder\sim.cfg file. It IS case-sensitive!
- Note also that Setting an AI Object as the ObjectFilter works fine, provided that AI Object is NOT the SimpleObject type!
- To trigger a PxT with a SimpleObject (e.g. A droppable Object), you MUST set the ObjectFilter to "Anything", then denote the ObjectName as String for "Trigger" and NOT "User" in the Condition Editor! Also RHS ObjectType must be "String".
- Note also that a PxT will NOT fire IF you are already INSIDE the RA when you drop the object. Thus consider the RAs height and the Players altitude when using the "On Enter" condition.
- Each Proximity Trigger is associated with an Area Definition, aka Rectangular Area (RA). This RA may either be fixed to a location or attached to an object.
When attached to an object, you may specify an offset from the object (in meters) defined by X, Y, and Z axis; where X is Port- to Starboard+, Y is Bottom- to Top+ and Z is Aft- to Forward+. Two of these Axes centers intersect with the aircraft's center of gravity (COG), the 0 position for x and z ONLY. 0 for y,(or height), IS 1/2 the y distance ABOVE the COG. To center the y axis with x and z, you must specify an offset = to -0.5 multiplied by the RA's y distance.
Note also that when attaching the RA to an Object, it should be rotated (heading) 90*. This will align x axis with lateral (wingtip to wingtip) and z axis with longitudinal (tail to nose). This will avoid a lot of confusion when using offsets or SimVar's WPT commands.
Likewise, when fixed to a location by Latitude, Longitude and Altitude (LLA), note that the Altitude of the AreaDef corresponds to the lower plane. Thus if you wish to center the altitude of the AreaDef with the Latitudinal and Longitudinal centers, you must offset its altitude by an amount equal -0.5 times the height of the AreaDef.
e.g. Let's assume you are flying at an altitude of 1000' msl and you wish to detect User entering the AreaDef. Assume you also wish to give him a tolerance of 100' above or below the center of the AreaDef. You would set the AreaDefs height to 200' and the AreaDefs altitude to 1000 - 1/2 times 200 or 900' msl.
- Be observant when placing a RA on unlevel ground...your triggering object may actually travel below the RA when on the ground and NOT fire the trigger In this case, either bank or pitch the RA to coincide with the ground level or increase height and set elevation below ground level. I have also found that simply deleting the RA, then adding back will solve the problem with it's PxT not firing....go figure!
- A Proximity Trigger, set for multi-shot, is actually two independent triggers in one, associated with the same Area. The entry filters and conditions apply ONLY to the entering actions. The exit filters and conditions apply ONLY to the exiting actions. Thus one trigger can fire WITHOUT the other! If deactivated upon entry, exit actions will NOT fire, and vice versa.
e.g. Trigger conditions are set at <80 knots (entering) and at <100 knots (exiting). Flying through the area at 90 knots, will trigger ONLY the exiting actions, since entry condition was NOT satisfied.
- If you wish to trigger an action based on both entry and exit parameters, then you must set up 3 separate (1 shot) triggers associated with the same area. PxT1 = 1st parameter met. PxT2 = 2nd parameter met. and PxT2a=2nd parameter NOT met. Only PxT1 is active. If PxT1 is satisfied, then PxT2 & PxT2a are activated. If PxT2 is satisfied, then positive actions are executed and PxT2a is deactivated. If PxT2a is satisfied, then negative actions are executed, PxT2 is deactivated, and PxT1 is reactivated.
 
Back
Top