making an image map with an overlay
Posted: Mon Oct 15, 2018 9:38 am
Hi all,
So I've already made my image maps for my game and they are working great!
What I would like to do next is overlay an image onto the screen I call, so that it's not part of the image map.
When the user clicks on that particular overlay, I want to have the item that was clicked be collected and hidden from my image map.
Because there are a ton of hotspots, I would like to figure out a way to hide this part of the map when clicked without redirecting the user to a second map where the image is removed. I don't even care if it's just a black box that appears ontop blocking the item. So I know the code is wrong, but if anyone knows how to do this I would die of appreciation.
So I've already made my image maps for my game and they are working great!
What I would like to do next is overlay an image onto the screen I call, so that it's not part of the image map.
When the user clicks on that particular overlay, I want to have the item that was clicked be collected and hidden from my image map.
Because there are a ton of hotspots, I would like to figure out a way to hide this part of the map when clicked without redirecting the user to a second map where the image is removed. I don't even care if it's just a black box that appears ontop blocking the item. So I know the code is wrong, but if anyone knows how to do this I would die of appreciation.
Code: Select all
items=[]
screen marysroomclickable:
imagemap:
ground "marysroom.png"
idle "mary room idle.png"
hover "mary room hover.png"
alpha False
# This is so that everything transparent is invisible to the cursor.
hotspot (737, 60, 314, 249) clicked Jump("Mopenwindow")
hotspot (39, 369, 73, 60) clicked Jump("Mphone")
hotspot (136, 506, 38, 52) clicked Jump("Mbooks")
hotspot (38, 105, 498, 254) clicked Jump("Mbunks")
hotspot (547, 181, 211, 257) clicked Jump("Mdresser")
hotspot (849, 231, 94, 126) clicked Jump("Mlamp")
hotspot (1114, 249, 84, 87) clicked Jump("Mdoor")
hotspot (646, 435, 480, 123) clicked Jump("Mrug")
hotspot (194, 17, 257, 124) clicked Jump("Mposter")
hotspot (21, 434, 109, 129) clicked Jump("Mnightstand")
hotspot (971, 574, 63, 54) clicked Jump("agnesletter")
label start:
label marysroommap (if item "Agnes\' Letter" in items):
show agnesletter
call screen marysroomclickable
if item "Agnes\' Letter" not in items:
call screen marysroomclickable
label agnesletter:
scene AgnesBrotherLetter
"Dearest..."
"Meet me at our spot at the witching hour."
"Bring the rope."
"With Love, Heath"
menu:
"Take the letter":
$ items.append("Agnes\' Letter")
jump marysroommap