vsTASKER 7 Tutorial
×
Menu
Index

Simple Entity

 
Let's create a basic Entity that will move in one direction.
 
First, let's create a simple_entity database.
Click then answer Yes at "Create a New Database".
 
 
The Database Template selector displays all available built-in Templates that facilitate database creation. For more on Templates, click here.
Select Basic then OK (or double-click Basic).
 
 
The Scenario Template selector lists all Scenario templates recorded inside the Basic Template.
Select Basic then OK (or double-click Basic)
 
 
To add an Entity on the terrain, right-click over the map (at the position you want to add the Entity) then select Add Template -> Entity.
 
 
The Entity Template selector lists all Entity templates recorded inside the Basic Template Scenario.
Select Basic then OK (or double click Basic)
 
Basic entity appears on the map and can be selected using the mouse (blue circle appears on selected or focused entities).
 
You can also reposition the entity by selecting it and moving over the map by keeping down the right mouse button.
 
Now, we will set the heading of the entity, visually (this can also be done using the Property Window)
 
Select the Entity then right click and select the Basic Setup option:
 
The heading selector is shown in orange. Select the heading handle and, while maintaining down the mouse button, rotate it around the circle at the desired heading.
 
Now, we need to set the speed of the Entity.
Just double-click the basic symbol displays the Entity Properties window.
 
 
In this window, find Initial Setting pane and set the speed to 5 m/s
 
Press OK.
 
Now, let's save the database.
Press and in the file window, write simple_entity, then Save:
 
Now, it is time to generate the code.
Be sure you have a Microsoft compiler properly installed (Visual Studio Professional or Express).
If you want to know how and where the code will be generated, look at the Database Setup options in the User Manual.
 
Press .
 
A Console window will appear and compilation will start.
You should have no problem compiling at this stage.
 
 
When build is successful, this means the compilation and link had no error and that the executable is ready to be loaded. Press Yes to load and start it.
 
 
The simulation engine starts as a Console because the Viewer is a Console.
For more information on Viewers, click here.
 
The simulation engine (console application) is connected to the vsTASKER GUI using the shared memory. So, we can start & stop the simulation using the control toolbar.
To learn more on this toolbar, click here.
 
Once the simulation has started, you can see the basic entity moving at 5m/s on the given direction.