Angled hotspots in imagemaps? (Resolved)

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
woahevil1
Newbie
Posts: 13
Joined: Wed Aug 19, 2015 5:58 am
Contact:

Angled hotspots in imagemaps? (Resolved)

#1 Post by woahevil1 »

Hey guys, I was just wondering if and how you would be able to create a angled rectangular hotspot, as currently I can only see it being able to do it at 90 degrees.
Here is what im trying to make an imagemap of https://gyazo.com/cdf2b4699a5485f0033423b7a8df5303

Thanks for the help :)
Last edited by woahevil1 on Tue Nov 24, 2015 9:40 am, edited 1 time in total.

User avatar
Evildumdum
Regular
Posts: 191
Joined: Sun Jan 18, 2015 8:49 am
Projects: ApoclypseZ
Contact:

Re: Angled hotspots in imagemaps?

#2 Post by Evildumdum »

Simple answer is, you can't. The good news is that there is a much easier way of doing it. Image buttons. To make an imagebutton you need two images, one for the button and one for when the mouse hovers over it. They need to be in a screen.

Example:

Code: Select all

label example:
    call screen example_screen

screen example screen:
    imagebutton "buttons/example_button_%s.jpg" xpos 0.5 ypos 0.5 action Jump("example2")
of the two images, one needs to have the word _idle on the end of its name and one needs to have _hover. For instance example_idle and example_hover. When you then put imagebutton you tell renpy to find the images to use them as a button. By putting _%s instead of either idle and hover, renpy automatically uses the one called idle as the idle picture and the one called hover when the mouse is over it. use xpos and ypos to move it around. Action tells renpy what to do. Make sure you start the instruction with a capital letter and make the label name go inside brackets and quotation marks.
"If at first you don't succeed, try hitting it with a shoe."

User avatar
mobychan
Veteran
Posts: 275
Joined: Fri Apr 24, 2015 6:31 am
Projects: The Chosen - Sakura Pink & Gentian Blue
Organization: Foresoft
Location: Germany
Contact:

Re: Angled hotspots in imagemaps?

#3 Post by mobychan »

You can use focus_mask for more exact focus
http://www.renpy.org/doc/html/style_pro ... properties

woahevil1
Newbie
Posts: 13
Joined: Wed Aug 19, 2015 5:58 am
Contact:

Re: Angled hotspots in imagemaps?

#4 Post by woahevil1 »

Thank you both for the response. The imagebuttons work like a charm, thanks again :)

Post Reply

Who is online

Users browsing this forum: Google [Bot]