hover problem

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
johannes89
Newbie
Posts: 7
Joined: Sun Oct 07, 2018 9:34 am
Contact:

hover problem

#1 Post by johannes89 » Sun Oct 07, 2018 9:44 am

Hey guys i was hoping someone will be able to assist me im struggling to create a hotspot correct where i can click on the kitchen and bathroom but this code below only click on the kitchen there are no hover for the bathroom what did i do wrong?

Code: Select all

$result=renpy.imagemap("kitchen_idle.png","kitchen_hover.png",[(6,3,600,1078,"kitchen"),(1381,14,527,1078,"bathroom")])
if result == "kitchen":
    label kitchen:

jump shower

if result == "shower":
    label shower:
Attachments
kitchen_idle.png
kitchen_hover.png

User avatar
IrinaLazareva
Veteran
Posts: 272
Joined: Wed Jun 08, 2016 1:49 pm
Projects: Legacy, Эра Тёмных Небес
Organization: IKG
Location: St.Petersburg, Russia
Contact:

Re: hover problem

#2 Post by IrinaLazareva » Sun Oct 07, 2018 11:36 am

try

Code: Select all

$result=renpy.imagemap("kitchen_idle.png","kitchen_hover.png",[(6,3,600,1078,"kitchen"),(1381,14,1917,1078,"bathroom")])
#-------------------------------------------------------------------------------------------------^^
You used old version of imagemap, where
hotspots - A list of tuples defining the hotspots in this image map. Each tuple has the format (x0, y0, x1, y1, result). (x0, y0) gives the coordinates of the upper-left corner of the hotspot, (x1, y1) gives the lower-right corner, and result gives the value returned from this function if the mouse is clicked in the hotspot.
By the way, there is current version of imagemap
There is a light at the end of the tunnel, just pray it's not a train.
___
TODO: unresolved/нерешённое

johannes89
Newbie
Posts: 7
Joined: Sun Oct 07, 2018 9:34 am
Contact:

Re: hover problem

#3 Post by johannes89 » Mon Oct 08, 2018 12:43 pm

wow thank you so much this have worked

Post Reply

Who is online

Users browsing this forum: No registered users