|
QSDK Documentation |
For a description of what an Entity Instance is, look here.
Note that any operations changing the state of an Entity Instance (create, destroy, properties change) can be undone using the QStudio undo/redo mechanism.
Examples of creating Entity Instances are shown step-by-step in the tutorial.
There are two ways to create an Entity Instance:
To do either of these you must have at least one writeable QGP (Q Game Placement) file available in the current project.
Locate a Group and show its context menu. This can be done:
the context menu will show a Create Entity Instance item:
on selecting this option the Create Entity Instance dialog will be shown:
fill in the fields as discussed here. When you click OK the properties dialog for the Entity Instance will be shown.
For this option to be available, you must have at least one createable Q/QML file and at least one writeable QGP file in the project.
Right-click in the 3D scene and select Create EntityInstance from the context menu:
the Create Entity Instance dialog will be shown.
To destroy an Entity Instance right-click on it in the Tree view and select Delete from its context menu:
you will be prompted for confirmation:
Entity Instances are usually invisible. To show their location you can Mark them by right-clicking on the Entity Instance in the tree view and selecting Mark:
the default marker is a pink flag. The colour can be changed in the visualisation preferences.
you can also use different marker meshes to indicate different Entity Types. Refer to the tutorial for more details.
The scene graph properties are all set when the Entity Instance is created and cannot be changed here. They are provided for information, and so that you can use the Properties buttons to show the properties for the Group or Entity Type.
In the game, an Entity Instance will only be activated if it:
to Add an instance to the list click the Add... button. The Instance selection dialog will be shown. Filter and select an Instance, then click OK. The new Instance will be shown in the list.
To remove an instance, select it and click the Remove button.
If you want to view an instance's properties, select it and click the Properties... button.
NOTE: a "dummy" instance can be created automatically by QStudio if indicated in the schema, or checked in the Entity Instance creation dialog (free or parented). After the dummy instance is created it will be added to the Instances list automatically. A dummy instance is extremely useful if no real character or mesh is being associated with the Entity Instance in QStudio, but the game requires the Entity Instance to come into scope to create a copy of a skinned figure or dynamic mesh.
The Preload Assets properties allows you to specialise the Q Objects/Entity Types that are to be preloaded for this individual Entity Instance, e.g. a particular sound may be required for a single door.
Where possible, you are advised to use the preload assets properties on the Entity Type to make this information common to multiple EntityInstances for efficiency.
Clicking Add... on the top group will show the Add Asset dialog, click on the Add... button on the bottom group will show the Add Entity Type Asset dialog.
|
|
|
Qube Software Limited © 2000-2004
|
|