Hello my friends!
I'm so sorry for such a beginner question. I need to ask you how to change Game Object in scene by action in other scene.
For example:
1st scene is Dark Street
2nd scene is Map of town
In 1st scene I gave a bottle of beer to homeless man a he told me where is a park he lived in.
In 2nd scene now I have a new location (just circle named "Park").
Other example:
1st scene is out side of shop
2nd scene is shop inside with shop keeper who is looking at me
In 1st scene I threw a stone to the shop window and break it.
In 2nd scene shop keeper is looking through the window.
If there is any discussion I missed, please send me a link (or video / pdf tutor). My english isn't good but I'm doing my best
Thank you for you help!
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Welcome to the community, @Disfemis.
You can't directly affect the contents of an unopened scene, but what you can do is rely on Global Variables to keep track of changes, which can then be checked when a scene opens.
Both of your examples could rely on a Global Bool variable, created in the Variables Manager, named "Given beer" and "Broken shop window" respectively, and both set to "False" by default.
When the Player causes these interactions, use the Variable: Set Action to set the variable to True. Because these are Global variables, they can be read/set from any scene.
Then, in the 2nd scene, create an OnStart cutscene in the Scene Manager and run the Variable: Check Action to check the bool value. For example, in the "Map of town" scene, check that "Given beer" is True - and if so, run the Hotspot: Enable or disable Action to enable the Park location. (You can have a Hotspot be disabled by default by attaching the Remember Hotspot component to it and setting its State on start to Off)
This technique is actually covered by the "Map screen" tutorial, which can be found here.