Preparing StateMachine Assets

States, transitions, and state machines can have associated properties that you set within the Sony StateMachine Editor. Objects can have additional properties defined that are accessible to other tools, such as the LevelEditor. The LevelEditor can read StateMachine Editor project files (.stmproj) directly.

Within the StateMachine Editor, each game object has a category in the Properties window that lists its properties in the state machine project. Each property has a control for changing its value to refine the object’s behavior. For example, the aggression level of a soldier game object could be adjusted using a slider bar. This aggression level becomes the default state for game objects in the LevelEditor that use the soldier state machine. Within the LevelEditor, you can then modify the default state properties for each instance of the soldier game object.

Using StateMachine and LevelEditor together in this way, designers can quickly test and iterate their designs without needing programmer intervention. For more information about setting properties, see the StateMachine Editor User’s Guide.

To run state machines in the LevelEditor, perform the following tasks:

  1. In your state machine designs, create instance properties using the StateMachine Editor Properties window or Property Table window. These properties will be visible and modifiable in the LevelEditor.
  2. Copy StateMachine Editor project files (.stmproj), state files (.stm), and Lua scripts (.lua) to the LevelEditor Resource Root folder.

 

The designer can then work within the LevelEditor.