Imagemap hotspots acting weird?

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
Egressus
Veteran
Posts: 240
Joined: Wed Apr 04, 2012 11:13 am
Projects: Things Not Seen
Location: Indonesia
Contact:

Imagemap hotspots acting weird?

#1 Post by Egressus »

So I was trying to make a map for my vn, but this happened.

The hotspot for the areas didn't seem to work properly, somehow extending towards some random areas. For example, when my cursor is over Restaurant, it looks like the hotspot covers the icon for that, Park and Place.
The size of the picture is the same as the size of the vn (900x700), I double checked to see that the hotspots were right. When I click on one of the spots it redirects to one of the labels for one of the areas.
I made sure the hotspots didn't overlap, changed the parts there and there, tried with cache and persistent deleted. Asked a bunch of people, and now they're stumped, too.

I updated Ren'py, too, so I'm lost.

Image

Code: Select all

screen artmap:
    imagemap:
        ground "artmapground.png"
        hover "artmaphover.png"
        
        hotspot (425, 24, 525, 110) clicked Return("Bakery")
        hotspot (425, 148, 502, 232) clicked Return("Library")
        hotspot (282, 227, 372, 317) clicked Return("RoseSquare")
        hotspot (195, 220, 274, 304) clicked Return("Gallery")
        hotspot (425, 148, 502, 232) clicked Return("Library")
        hotspot (472, 484, 557, 572) clicked Return("Place")
        hotspot (259, 427, 355, 521) clicked Return("Restaurant")


    call screen artmap
    $ location = _return
    if location == RoseSquare:
      " blah blah"      
    elif location == Library:
      " blah blah"         
    elif location == Gallery:
      " blah blah"      
    //etc etc
Any help would be appreciated, thanks!
Hiatus of hiatuses

apricotorange
Veteran
Posts: 479
Joined: Tue Jun 05, 2012 2:01 am
Contact:

Re: Imagemap hotspots acting weird?

#2 Post by apricotorange »

You aren't specifying your coordinates correctly; a hotspot takes "(x, y, width, height)".

Egressus
Veteran
Posts: 240
Joined: Wed Apr 04, 2012 11:13 am
Projects: Things Not Seen
Location: Indonesia
Contact:

Re: Imagemap hotspots acting weird?

#3 Post by Egressus »

A friend suggested that, but it doesn't seem to change anything. But I'll try again...
Hiatus of hiatuses

Post Reply

Who is online

Users browsing this forum: No registered users