Applying an ImageDissolve to an Imagemap element

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
tim640
Regular
Posts: 49
Joined: Wed May 23, 2018 4:47 pm
Contact:

Applying an ImageDissolve to an Imagemap element

#1 Post by tim640 »

Hello, friends!
Continuing to work and learn, ran into a puzzle.

I have a very standard Imagemap:

Code: Select all

        imagemap:
            ground "images/locations/marshome.png"
            selected_hover "images/locations/marshomedoor.png"
            hover "images/locations/marshomedoor.png"
            alpha False


            hotspot (42, 184, 390, 840):
                action [SetVariable("location", "seasaltmap"), Show("overlayy2"), With(diagonal), Show("map"), Show("historylog"), Hide("locations")]
                activate_sound "music/door.mp3"
                if not renpy.variant("touch"):
                    hover_sound "music/hover.mp3"
So obviously selected_hover and hover is an overlay image of the ground picture with highlighted elements where the hotspots are. Once you hover over the hotspot, this overlay is called and shown over that spot.

My question is: i want it to appear with an effect\animation, i don't like how rough it looks when every other element i have is animated. Is there a way to add an ImageDissolve to the hover image?

I've tried doing in by defining an image and using

Code: Select all

image renflatoverlay:
    "images/locations/marshomedoor.png" with ImageDissolve("wipes/rain2.jpg", 0.5, time_warp=_warper.easeout)

, however it doesn't work at all - i guess because for ImageDissolve to work, the element should be called through the "show" statement?.. It's pretty late here so i might be just dumb haha.

I really appreciate the help and ideas, thank you all in advance!

User avatar
m_from_space
Miko-Class Veteran
Posts: 975
Joined: Sun Feb 21, 2021 3:36 am
Contact:

Re: Applying an ImageDissolve to an Imagemap element

#2 Post by m_from_space »

tim640 wrote: Wed Dec 27, 2023 3:18 pmOnce you hover over the hotspot, this overlay is called and shown over that spot.
Not sure it works, but have you tried using simple transforms for the hotspots?

Code: Select all

transform fadein:
    alpha 0.0
    linear 0.5 alpha 1.0
    
    
screen myscreen():
    imagemap:
        ground "myimage"
        ...
        hotspot (0, 0, 100, 100) at fadein:
            action NullAction()

Post Reply

Who is online

Users browsing this forum: No registered users