S2ENGINE HD 2023
User guide
×
Menu
Index

Persistent Objects

When you divide a game in more than one level you could need to keep some game data from a level to another.
An example is the player state as showed in the previous topic.
But you could need persistent data of other objects in the scenes.
 
For example imagine a document in an adventure game, imagine that the same document exists in the first 3 levels of your game, if player pick-up this document in the first level it must disappear in subsequent levels, otherwise if player doesn't pick-up it in the first level it must appear in the subsequent level.
In this case we say that the object must become persistent.
 
To make an object persistent: