Hi there,
I'm trying to impliment a system where a choice made in the dialogue will enable/disable a gameobject in the next scene, or even three/four plus scenes in advance. So far I have a boolean variable for what choice was made but now am trying to think what would be the best way to have the decision carry over to the next loaded scene. Any help in this woul dbe greatly appreciated.
Thank you
Choice enables gameobject in next scene
Re: Choice enables gameobject in next scene
Hi,
In the next scene, add a Dialogue System Trigger. Set its Trigger dropdown to OnSavedDataApplied. (OnSaveDataApplied works just like OnStart, except if you're coming from another scene or loading a saved game it also waits until any save data has been applied to the scene.)
Set Conditions > Lua Conditions to check the Boolean variable.
Then select Add Action > Set GameObjects Active/Inactive or OnExecute() UnityEvent (either is fine), and configure the action to activate/deactivate your GameObject.
In the next scene, add a Dialogue System Trigger. Set its Trigger dropdown to OnSavedDataApplied. (OnSaveDataApplied works just like OnStart, except if you're coming from another scene or loading a saved game it also waits until any save data has been applied to the scene.)
Set Conditions > Lua Conditions to check the Boolean variable.
Then select Add Action > Set GameObjects Active/Inactive or OnExecute() UnityEvent (either is fine), and configure the action to activate/deactivate your GameObject.
Re: Choice enables gameobject in next scene
Perfect thank you, that seems to be working great!
Re: Choice enables gameobject in next scene
Glad to help!