Forum rules - please read before posting.

Popup Scene Remove Problem

Hi everyone,
hope you are having wonderful day!

As I am making my first 2D game in AC, I stumbled upon a problem with popup scene removal.
A have two scenes, one depicts a machine with a rotable wheel and the other scene is zoomed view of this wheel.
Player has to click on the machine in first scene, popup of the wheel appears in the middle and then he has to rotate it in a sequence to get further in a game.

In scene 1, there is a hotspot over the wheel which uses Scene: Add or remove to add Scene 2 by name, which shows overlapping scene 1. After that, player can click on hotspot in Scene 2 which uses Scene: Add or remove to remove Scene 2 by name.
In this case, two problems occur:

a) After showing Scene 2, hotspots in Scene 1 are still clickable. I worked around it with creating large hotspot without any cursor or label under Scene 2 which "hides" everything under it. This solution still feels kinda wrong tho. Is there a better way to do it?

b) As soon as use hotspot to remove Scene 2, no hotspots in Scene 1 are working. I worked around it with changing the hotpost in Scene 2 from Scene: Add or remove to Scene: Switch with checked Reload even if scene is already open. Even tho it works, it doesn't look very good because of Scene 1 background reload.

I also tried making the scene 2 into popup as menu - it solved both problems (a by checking pause game when enabled and b by simply closing the menu), but I was unable to come up with an idea how to control the rotable wheel by clicking on it and making it move.

Thank you for your ideas!

Comments

  • Welcome to the community, @PhoxStyle.

    After showing Scene 2, hotspots in Scene 1 are still clickable. I worked around it with creating large hotspot without any cursor or label under Scene 2 which "hides" everything under it.

    When multiple scenes are open, they're treated as one big scene by AC - so you will have to do some trickery to prevent Scene 1 from being interactive.

    An alternative method might by to either disable all of Scene 1's Hotspots, or teleport them out of the way. If they all shared the same parent GameObject (i.e. "_Hotspots" using the Scene Manager's Folders option), then you could use the Object: Teleport Action to reposition this parent (and all of the Hotspots underneath it) out of the camera view during this time.

    As soon as use hotspot to remove Scene 2, no hotspots in Scene 1 are working.

    That shouldn't be the case, and I can't reproduce such an issue. What are your AC and Unity version numbers, and how exactly are Hotspots not working? Do labels appear over them, but just they aren't clickable - or are they completely non-interactive?

    I also tried making the scene 2 into popup as menu - it solved both problems (a by checking pause game when enabled and b by simply closing the menu), but I was unable to come up with an idea how to control the rotable wheel by clicking on it and making it move.

    If you wanted to avoid adding scenes together, an alternative approach would be to turn the whole "close up" into a prefab, or again parent it all to a single GameObject - and then either spawn it in at runtime (using Object: Add or remove) or hide it from view and then show it with Object: Teleport.

    One note about making it a spawned prefab: scene-based Action cannot exist as prefabs, so you'd have to move all the logic to ActionList asset files, and then have your Hotspots etc call assets instead of scene-based Interactions when interacted with.

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.