Goto
Revision as of 00:02, 26 August 2023 by Silvematt (talk | contribs) (Created page with "thumb|''FirstMainQuest_Goto'' that allows the player to automatically receive the first Main Quest when a new character spawns in the world for the first time. A Goto Object is an object, most of the times invisible, with a Trigger Collider that triggers Events and Consequences when the player or an entity such as the AI enters that collider. It is used to trigger actions upon reaching a certain location. Elements: * '''...")
A Goto Object is an object, most of the times invisible, with a Trigger Collider that triggers Events and Consequences when the player or an entity such as the AI enters that collider.
It is used to trigger actions upon reaching a certain location.
Elements:
- OnEnter Result Script: the result script that will run when the Collision Target will reach this collider.
- OnExit Result Script: the result script that will run when the Collision Target will leave this collider.
- OnEnter Events: the events that will run when the Collision Target will reach this collider.
- OnEnter Delay Activation: the amount of time to wait before triggering the OnEnter events after the Collision Target entered this collider.
- Allow Multiple OnEnter Triggers: if this is true the events will run every time the player will enter this collider, otherwise only the first time.
- Destroy After OnEnter: if this is true, the GameObject will be destroyed after triggering the events.
- // Same but for OnExit
- CollisionTarget: who can test for OnEnter/OnExit cheks (Player or/and AI)
Goto objects are used extensively with Mutables, to allow that the events regarding the Goto object are called only once. The flag "Destroy After OnEnter" most of the time is not sufficient, because if the Player enters a Goto and it gets destroyed, if the player saves and load in the same place the Goto object will be reloaded in the game.
For that reason, Mutables allows to wrap Goto objects into a savable state.
Read more on the mutable page.