Hide screen imagemap
Posted: Sun Apr 23, 2017 3:39 am
Hello, I'm making a game where there is a additional object on the background and the player have to click on that object to obtain it. Kinda like a hidden object game but the sprite and the story of the game still continue normally.
Currently, the screen will disappear once label sea ends, but I want it to disappear whenever the player picked up the shell (= label found finished). How can I do that? @@
Thank you
Code: Select all
#This is the screen code
screen seashell:
imagemap:
ground "shellground.png" #sand with no shell image
hover "shell.png" #shell only image
idle "shell.png"
#tried to add "if gotshell == False:" but no use
hotspot (14, 641, 39, 34) clicked Replay("found", locked=False) #use "replay" so the "return" command can return to current played game
Code: Select all
#This is the normal game
label sea:
scene sea with dissolve
show screen seashell #have to use "show screen" since "call screen" will hide all the sprites and scenes
show st happy with dissolve
st "If you can find the magic shell, you'll get a wish"
hide screen seashell #tried to add "if gotshell == True:" but no use
jump continuegame
label found:
scene sea with dissolve
show gotshell at center with dissolve
"Congratulation, you got a shell!"
hide gotshell with dissolve
$ gotshell = True
return
Thank you