Forum rules - please read before posting.

Scene Switching

edited November 2018 in Technical Q&A
Hi guys! Making my first post here.
I'm kind of stuck on this issue. I don't know if there's even functions for this. (Working in 2D)
Here's a picture for some clarity.

https://ibb.co/g6jRNq

So I've got 6 scenes. Scene 1 is the starting scene. And you go through scene 2 to scene 3. And in scene 3 a cutscene gets triggered so if you "go back", the player goes back to Scene 4 instead of Scene 2. (pretty much the same, just 1 difference in design)
From scene 4 you can go in all directions, except for back to scene 2. That one should be inaccessible for the rest of this part of the game.
Though. The hotspots to switch to Scene 2 and 4 from Scene 1 are in the same place. I've tried using OnLoad to disable the first hotspot to Scene 2 and activate the one to Scene 4 when you've entered Scene 1 from Scene 4. But now my game completely disables the first hotspot to Scene 2.
Is there any function that can help me use Hotspot 1 at first and 2 after the cutscene/returning from scene 4? I've tried with the OnStart function but that didn't do anything.

https://ibb.co/cvSNdV

Preferable without coding, because I'm really not too experienced with that.
A workaround way would also work for me. 
Thanks in advance!

Comments

  • Welcome to the community, @Abracadayum.

    Though I don't know of the details about the "1 difference in design", it may be that having Scene 2 being able to change itself to appear like Scene 4 is the way to go.  If the difference is visual, you can likely just use an Animator to control the changes - but if you want to share more details about it we may be able to offer more specific help.

    As a general answer to your question, though, you can rely on Variables to keep track of events the player has reached.  Global variables should be used for "game-wide" changes that span multiple scenes, while Local variables are good for ones that only affect one scene.

    In this case, you can create a Global Boolean variable named e.g. "Can go to scene 4", which is set to False by default.  At the point at which Scene 2 is disabled, and Scene 4 is to be swapped in, you can use the Variable: Set Action to change this variable's value to True.

    Then, instead of having two separate Hotspots in Scene 1, you can use a Variable: Check Action inside just one Hotspot's Interaction to determine this variable's value.  If it's True, go to scene 4; if False, go to scene 2.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.