Trouble with image mapping...

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
ferrisknite
Newbie
Posts: 8
Joined: Wed Jul 04, 2012 4:38 pm
Contact:

Trouble with image mapping...

#1 Post by ferrisknite »

So here's my code:

Code: Select all

label character_choice:
screen character_choice:
    imagemap:
        ground "Backgrounds/more.png" 
        hover "Backgrounds/less.png"
        
        #Shift + D to open menu, hit image location picker. 
        hotspot (94, 206, 162, 156) clicked Return ("Cyren")
        hotspot (501, 202, 193, 166) clicked Return ("Kayle")

label example:

        call screen character_choice
        
        $ result = _return
        
if result == "Cyren":
        menu:
            "Are you sure?"
            "Yes":
                jump cyren_yes
            "No":
                jump character_choice
        
What I want is for two characters to appear, and for the user to pick one. When the mouse isn't on a character, it's grayed out. When it is, it appears in full color. I made the two images for this, but for some reason the image mapping isn't working. I have it as small squares of the picture, and that works fine, but when I try to expand it to a whole character, instead of making the hotspot bigger it just takes the hover picture and moves it to the new coordinates. >->; I'm not sure what I'm doing wrong here, so some help would be greatly appreciated.


ferrisknite
Newbie
Posts: 8
Joined: Wed Jul 04, 2012 4:38 pm
Contact:

Re: Trouble with image mapping...

#3 Post by ferrisknite »

Thank you so much! That worked.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], henne