The Add Simulation Command example demonstrates the following:
- How to create and register a new simulation command
- How to create a simulation command executor to execute simulation commands
The Add Simulation Command example adds a new simuation command which will receive and implement the new MySimCommand. Since this example is loaded as a plugin, it can be used in conjunction with the released VR-Forces application
How to Run the Example
This example demonstrates how to add a new kind of sim command.
Usage
In the Launcher, click the Plug-ins button to bring up the Plug-ins Selection dialog. Enable the plugin.
To view the new behavior:
-
Start VR-Forces GUI and SIM.
-
Create a new scenario - e.g. EntityLevel SMS on Ground_DB II terrain.
-
Create a M1A2 entity.
-
Right-click on entity and select 'Plan...'.
-
In the 'Plan' dialog, select Commands -> My Sim Command Message... to bring up dialog for new command.
-
In 'Simulation Command Message Example' dialog, type in an arbitrary message. It will get displayed in the entity's console window when the command is executed.
-
Click OK to close the 'Simulation Command Message Example' dialog.
-
Click OK to close the 'Plan' dialog for the entity.
-
Right-click>Information on the entity to display its information window.
-
Click on the 'play' button.
-
Note that the text you typed in to the 'Simulation Command Message Example' dialog appears in the entity information window and in the sim engine console, prefaced by the name of the entity.
Classes
Plugin Entry Points
extern "C" {
{
}
{
return true;
}
}