Page 1 of 1

Imagemap Not Appearing

Posted: Tue Oct 16, 2018 12:47 am
by Glacerose
Hello all. I have a game im making with a Town Map. The map itself appears fine, the icon appears in the main game fine, and is clickable and takes you to the "Overworld" screen, which is where the actual town map is. The issue is in this town map none of the imagemaps which represent the different parts of the game world appear.

Here is the code for the map icon that appears in the main game

Code: Select all

screen UIoverlay:

    imagemap:
        xpos 1755 ypos 15
        alpha True
        ground "map.png"
        hover "maphover.png"
        hotspot (0, 0, 155, 150) clicked Show("Overworld")

And here is the code for the Overworld map itself, in which the imagemap simply doesnt appear.

Code: Select all

screen Overworld:

        imagemap:
            xpos 890 ypos 590
            alpha True
            ground "mchouse.png"
            hover "mchousehover.png"
            hotspot (0, 0, 400, 600)
           


Any ideas? Im completely lost.

Edit.
I'm not getting any errors or any trace back. The imagemap on the Overworld screen simply isnt appearing at all.

Re: Imagemap Not Appearing

Posted: Sat Oct 20, 2018 4:36 pm
by lil steffi
1st thing: you need to define all the hotspots on overworld. this is super simple if you go into renpy and do a (shift + d) and look up your overworld image. then you can highlight all the areas you wanna show as clickable.

for example:

screen overworldClickable:
imagemap:
ground overworld.png"
idle "overworld_idle.png"
hover "overworld_hover.png"

alpha False
# This is so that everything transparent is invisible to the cursor.

hotspot (17, 429, 232, 87) clicked Jump("House")
hotspot (592, 155, 111, 146) clicked Jump("whatever1")
hotspot (576, 496, 47, 39) clicked Jump("whatever2")
hotspot (774, 592, 92, 62) clicked Jump("whatever3")
hotspot (1124, 7, 151, 578) clicked Jump("whatever4")

then you can call it in your code:

label overworldmap:
call screen overworldClickable

label House:
put cool stuff here
jump overworldmap