Imagemap Not Appearing

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
Glacerose
Newbie
Posts: 1
Joined: Tue Oct 16, 2018 12:41 am
Contact:

Imagemap Not Appearing

#1 Post 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.

User avatar
lil steffi
Newbie
Posts: 8
Joined: Sun Oct 07, 2018 1:12 pm
Contact:

Re: Imagemap Not Appearing

#2 Post 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

Post Reply

Who is online

Users browsing this forum: No registered users