DEBUGGING MODEL BEHAVIORS

The best way to debug your Model Behaviors is to go through the Behaviors Debug Window (this window can be opened after starting a flight, with an aircraft in the air):

The Model Behaviour Debug Menu

 

A good way to catch most errors is to use the Errors tab, which will list out all the errors that have been found while loading the aircraft. In order to preserve performance, errors will only be listed on loading the aircraft and so you will probably need to reload the plane  from the Quick Reload.

 

The Errors tab will allow you to find general errors regarding the Model Behaviors and the naming side of things, but you may sometimes have issues that are caused by the RPN logic not behaving the way you would expect it to. When that happens, the Behaviors and InputEvents tabs are the ones that will generally contain the information need to correct the issue. Where exactly to look at will depend greatly on what the issue is, but there are a few tips that can be helpful in finding out the cause of issues:

 

  • Some issues that may look like RPN issues can be caused by an issue in the animation, a good way to check for those issues is to find the animation in the Behaviors tab and use the Force Position slider to ensure it does what it is meant to.

 

  • The Logger, which can be used on many of the RPN based elements can allow you to read through the steps the RPN calculator goes through and figure out where the values are not what you expected.

 

  • Another way to debug the flow and the values of the RPN, especially for bits of code that cannot be debugged using the Logger, is to set LocalVars (or I/O vars) and use that to follow the flow and values of the RPN code.

 

  • Input Events can also be a good way to see how your interactions react with a single Key Event, as opposed to interacting with a peripheral which can be hard to limit to a single input.