ScenarioVariable - TriggerValue logic

Discussion related to Mission design and creation.
Locked
maxaero
Posts: 16
Joined: Tue Oct 29, 2013 4:02 pm

ScenarioVariable - TriggerValue logic

Post by maxaero »

P3D 3.2 SimDirector

When attempting to create a TriggerValue logic in a scenariovariable, 'This object has no conditional properties' is displayed in the Conditional Logic pane, and there doesn't look like any ability to define TriggerValues.

When I view the Tic-Tac-Toe example, I see TriggerValues in the SimDirector UI and see them defined in the XML as well.

So, it looks like the SimDirector UI will read in and let you edit TriggerValues, but not create new TriggerValues if one doesn't already exist.

Any insight?
maxaero
Posts: 16
Joined: Tue Oct 29, 2013 4:02 pm

Re: ScenarioVariable - TriggerValue logic

Post by maxaero »

Update -

If you immediately attempt to define the TriggerValue logic after adding the TriggerCondition to a ScenarioVariable, the ConditionalLogic UI does not provide you the option of defining TriggerValues.

If you add a TriggerCondition to a ScenarioVariable, save the scenario and then re-load it into SimDirector, you can then define the TriggerValue for already defined TriggerConditions.
maxaero
Posts: 16
Joined: Tue Oct 29, 2013 4:02 pm

Re: ScenarioVariable - TriggerValue logic

Post by maxaero »

Thanks for the reply Mike,

It looks like you combined my posts - but they are two separate issues.

I've been attempting to work with ScriptTriggers and ScriptActions - but they are challenging to use because they are a black box. There doesn't appear to be any validation support or debugging support. Writing scripts can be a frustrating and time consuming experience. Any suggestions on how to efficiently validate and test LUA scripts?
Mike LM

Re: ScenarioVariable - TriggerValue logic

Post by Mike LM »

After rereading the two separate threads, I split them back apart. They had appeared to be the same issue at first glance. Sorry for the confusion.

Make sure that !lua is the first line of all of your LUA scripts. If you don't Prepar3D will think they're RPN scripts. To run the validation, make sure that you have the validation output window open in SimDirector. There's a "Run Validation" button in the top right of that window. It should validate your script.

As for testing, Preview Mode is the thing to use. Under the Home tab in the ribbon, you should see "Preview Mode" on the far right. Clicking that will run your scenario without leaving SimDirector. You can monitor different properties as the scenario runs and keep track of how things are going.

- Mike
Locked