Persistent Position Data

Component > Dialogue System > Save System > Persistent Position Data

Persistent Position Data saves and restores the GameObject's current position between level changes and in saved games.

Properties

Property Function
Override Actor Name Specifies the name to use in the Lua Actor[] table. If blank, uses the GameObject's Override Actor Name internal name or the name of the GameObject
Record Current Level If ticked, records the name of the level that actor is in.

Details

This component saves the game object's position and rotation into the Lua environment.

When the player loads a saved game, the GameObject will be moved to the correct position instead of the scene's starting position.

If the Record Current Level checkbox is ticked, the object also records its current level. If ticked, then when asked to apply this persistent data later, the object will apply the correct position data for the current level.

Setting Spawnpoints

If the Lua environment contains a value Actor[actorName].Spawnpoint, the actor will instead move to the position of the GameObject named by this value.

Note that this only applies if the player loads a saved game or arrives from another scene. It's most frequently used to specify the entrypoint in the new scene when the player arrives from another scene, typically in the LoadLevel() sequencer command. If you don't use the LoadLevel() sequencer command, you can manually set the value before changing scenes.


<< Components