How to Change the 'Hovers' in Imagemaps?

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
ArizaLuca
Veteran
Posts: 241
Joined: Tue Feb 20, 2018 12:59 pm
Completed: Through the Screen, Riddle Me This, Trust Fall, Phobias, Another Adventure
Projects: The Souls in the Seams, Fata Morgana, Minecraft: Story Mode - Behind the Scenes
Organization: Astral Autumn Games
Tumblr: astralautumngames
Deviantart: ArizaLuca
itch: astralautumngames
Contact:

How to Change the 'Hovers' in Imagemaps?

#1 Post by ArizaLuca »

I used these tutorials: viewtopic.php?f=51&t=46229&p=485703#p485703 and viewtopic.php?f=51&t=17301 in order to try and code this, just as reference.

I have a visual novel main menu screen where the hovers change. What I mean by that is that the screen is an imagemap, and if you hover over 'Start', a person will fade into sight behind them, so on so forth for the Load and other screens.

Depending on if you've reached the full ending, the people behind the hotspots will appear differently-- I would like to know how to code it so that the Hover image (the one where you hover over the text) will appear one way if you have hit the persistent mark.

If you would like more clarification, please ask.

philat
Eileen-Class Veteran
Posts: 1909
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: How to Change the 'Hovers' in Imagemaps?

#2 Post by philat »

You should probably use imagebuttons for that.

ArizaLuca
Veteran
Posts: 241
Joined: Tue Feb 20, 2018 12:59 pm
Completed: Through the Screen, Riddle Me This, Trust Fall, Phobias, Another Adventure
Projects: The Souls in the Seams, Fata Morgana, Minecraft: Story Mode - Behind the Scenes
Organization: Astral Autumn Games
Tumblr: astralautumngames
Deviantart: ArizaLuca
itch: astralautumngames
Contact:

Re: How to Change the 'Hovers' in Imagemaps?

#3 Post by ArizaLuca »

That's... I'm not sure that's the problem. I feel like the problem focuses more on the fact that I want the images to appear one way before a persistent point is hit, and then another way after the point is hit. Is there a way to code this, whether with imagemaps or imagebuttons? Thank you.

philat
Eileen-Class Veteran
Posts: 1909
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: How to Change the 'Hovers' in Imagemaps?

#4 Post by philat »

It is simpler to separate out the parts of the image that will change and make them buttons, is the point. You can use an if/else or any kind of dynamic displayable (https://www.renpy.org/doc/html/displaya ... splayables), but, at first thought, it will be more difficult to work within the constraints of imagemap and its hotspots. Although I don't know what your images look like, so perhaps I could be wrong. *shrug*

ArizaLuca
Veteran
Posts: 241
Joined: Tue Feb 20, 2018 12:59 pm
Completed: Through the Screen, Riddle Me This, Trust Fall, Phobias, Another Adventure
Projects: The Souls in the Seams, Fata Morgana, Minecraft: Story Mode - Behind the Scenes
Organization: Astral Autumn Games
Tumblr: astralautumngames
Deviantart: ArizaLuca
itch: astralautumngames
Contact:

Re: How to Change the 'Hovers' in Imagemaps?

#5 Post by ArizaLuca »

The gist of the images are below:
mainmenu_idle.png
mainmenu_hover_1.png
(Please ignore the weird grayish bits around the buttons; just the bits that are actually colored are important.)

The above image is the hover-- if you hover over a button, the image behind it will fade into sight, and so on so forth depending on what you're hovering over.

philat
Eileen-Class Veteran
Posts: 1909
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: How to Change the 'Hovers' in Imagemaps?

#6 Post by philat »

That's my point. You can't make irregular shaped hotspots, so you shouldn't be thinking of it as changing the hovered image in an imagemap. Either make the entire thing an imagebutton (although it's difficult to use fade in/out in that case), or scrap that entirely and use hovered to toggle whether the image behind the button is showing.

(more on hovered: https://www.renpy.org/doc/html/screens.html#button
more on showif: https://www.renpy.org/doc/html/screens. ... -statement)

ArizaLuca
Veteran
Posts: 241
Joined: Tue Feb 20, 2018 12:59 pm
Completed: Through the Screen, Riddle Me This, Trust Fall, Phobias, Another Adventure
Projects: The Souls in the Seams, Fata Morgana, Minecraft: Story Mode - Behind the Scenes
Organization: Astral Autumn Games
Tumblr: astralautumngames
Deviantart: ArizaLuca
itch: astralautumngames
Contact:

Re: How to Change the 'Hovers' in Imagemaps?

#7 Post by ArizaLuca »

Ahhh, alright-- thank you!

Post Reply

Who is online

Users browsing this forum: Google [Bot]