Problems with Image Maps

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
User avatar
Angie
Regular
Posts: 157
Joined: Sun Apr 27, 2014 8:00 am
Location: Norway
Contact:

Problems with Image Maps

#1 Post by Angie » Sun Apr 27, 2014 11:12 am

Hello everyone... I'm pretty new to Ren'Py, and I've had some problems with doing an image map.

My code:

Code: Select all

screen example_imagemap:
    imagemap:
        ground "tablet.png"
        hover "tablet2.png"


        hotspot (87 ,108 ,141 ,60) clicked Return("work")
        
label example:
    
    call screen example_imagemap    
    $ result = _return
            
    if result == "work":
        "You chose work"
                
    return
        
I just done one 'button', just to try it out.
The image maps with this coding look like this:

http://zapodaj.net/45734c0e27ae2.jpg.html

When I hover over it:
http://zapodaj.net/d325a19521a1a.jpg.html

How it should look like:
http://zapodaj.net/333cacecb9d67.jpg.html
http://zapodaj.net/73694bcbfa53d.jpg.html

At the very beginning when I started, with some random x and y coordinates, it wasn't fully changing as I was hovering over the button and when I checked the coordinates and put them into code - that happend. I can't grasp what's the problem at all...

User avatar
Alex
Lemma-Class Veteran
Posts: 2981
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Problems with Image Maps

#2 Post by Alex » Sun Apr 27, 2014 11:20 am


User avatar
Angie
Regular
Posts: 157
Joined: Sun Apr 27, 2014 8:00 am
Location: Norway
Contact:

Re: Problems with Image Maps

#3 Post by Angie » Sun Apr 27, 2014 11:24 am

It did help! Thanks!

I usually never check FAQ on site, I don't really know why. Guess I should start to do so! Once again, thanks a bunch.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]