Call Action with LinearVec from Agent

From SIMboxWiki
Jump to navigation Jump to search

It is possible to call actions that take LinearVec arguments using an agent. Here is an example:

Let's say you are creating an agent that will make a Cessna perform the GoToPoint maneuver. First your agent calls ACTION_SET_ACTIVE_MANUEVER_NAME with the argument GoToPoint. Next you want your agent to call ACTION_MANEUVER_GOTO_POINT_SET_POINT so that the aircraft will fly to a certain point. In Agent Editor, right click where you want to insert this step, and select Advanced -> Call Action as shown below:

CallActionAgent.png

Search for and select ACTION_MANEUVER_GOTO_POINT_SET_POINT from the list of actions that are available. As you can see, the input argument for this action is a LinearVec. Input the x, y, and z values that you desire, separated by commas, as shown below:

ActionLinearVec.PNG

Save the agent and run your session. The actions will be called and ATT_MANEUVER_GOTO_POINT_DESTINATION_POINT will be set as desired, as shown below:

LinearVec Action Agent.PNG