Page 1 of 1

Is there a way to move back and forth between imagemaps?

Posted: Thu Sep 14, 2017 9:34 am
by polisummer
I need some help jumping between call screens. Basically each screen is an imagemap that has hotspot buttons on it. When you click a hotspot it will do `Show("other_screen")` and call a different screen, with a different image map. The issue is that on subsequent imagemaps, if I press a hotspot button that should call the previous screen, nothing happens. The other imagemap doesn't get drawn and the current imagemap remains. Is this something to do with `call`? Is there a way to return from a current call to a previous one?

An exmaple of my code is below:

Code: Select all

label hill_dialogue:
  scene hill
  # dialogue
  e "dialogue test"
  "end of dialogue"
  call screen Town


screen Hill():
    imagemap:
        ground "hill.png"
        hover "hill_hover.png"
        hotspot(520, 264, 664-520, 652-264) action Jump("hill_dialogue")  # begin hill dialogue
        hotspot(914, 842, 1610-914, 1080-838) action Show("Town")         # path to town

screen Town():
    imagemap:
        ground "Town.png"
        hover "town_hover.png"
        hotspot(115, 451, 380-115, 724-451) action Show("Hill")   # path to hill
        hotspot(568, 502, 912-568, 700-502) action Show("Pub")    # door to pub
So after the dialogue I am sent to the Town, where I can click on a button that should send me back to the hill. However, nothing happens when I click on that button.

Re: Is there a way to move back and forth between imagemaps?

Posted: Thu Sep 14, 2017 9:47 am
by Remix
action [ Show('other_screen'), Hide('self_screen') ]

Basically you are showing screens one on top of the other, then trying to show the other which already exists underneath and stays there hidden...

Re: Is there a way to move back and forth between imagemaps?

Posted: Thu Sep 14, 2017 9:51 am
by polisummer
Remix wrote: Thu Sep 14, 2017 9:47 am action [ Show('other_screen'), Hide('self_screen') ]

Basically you are showing screens one on top of the other, then trying to show the other which already exists underneath and stays there hidden...
That solved it, thanks!