Hovering/ Unhovering not registering properly

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
Kinmoku
Miko-Class Veteran
Posts: 560
Joined: Mon Aug 11, 2014 9:39 am
Completed: One Night Stand
Projects: Love IRL, Memories
Tumblr: gamesbykinmoku
itch: kinmoku
Location: Germany
Contact:

Hovering/ Unhovering not registering properly

#1 Post by Kinmoku » Mon Nov 08, 2021 10:29 am

Hi all,

I have some tooltips and other buttons in my game that change variables when hovered/ unhovered. However, sometimes (seemingly random) they get stuck on hovered, even though they were unhovered. It seems like a Ren'Py bug, but I wanted to check here and see if anyone else has experienced it?

It's a difficult bug to replicate as it happens maybe 1/4 times. There seems to be no pattern as to why it does it, unless the mouse is moved fast. Even so, this isn't always the cause.

Here's an example, though there's nothing particularly special going on:

Code: Select all

imagebutton:
                idle theme_image("drawing collection off")
                hover theme_image("drawing collection on")
                hovered SetVariable("_hovering_on_button", True)
                unhovered SetVariable("_hovering_on_button", False)
                action SetVariable("_hovering_on_button", False), Show("drawing_denied")
Even when the button is clicked, the variable is changed to False, but I have instances of _hovering_on_button = True after I have unhovered and clicked. I'm really stuck as to what to do! :( If I re-hover and unhover the said button, it sorts itself out, but not all players will do that and will find it frustrating at the frequency it happens.

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Hovering/ Unhovering not registering properly

#2 Post by PyTom » Mon Nov 08, 2021 11:16 am

What version of Ren'Py is this with? I've made a number of fixes in this area, but it's hard to tell for sure.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
Kinmoku
Miko-Class Veteran
Posts: 560
Joined: Mon Aug 11, 2014 9:39 am
Completed: One Night Stand
Projects: Love IRL, Memories
Tumblr: gamesbykinmoku
itch: kinmoku
Location: Germany
Contact:

Re: Hovering/ Unhovering not registering properly

#3 Post by Kinmoku » Mon Nov 08, 2021 11:40 am

PyTom wrote:
Mon Nov 08, 2021 11:16 am
What version of Ren'Py is this with? I've made a number of fixes in this area, but it's hard to tell for sure.
I'm on 7.4.10.2178, but I had it with the previous versions I was using as well :(

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Hovering/ Unhovering not registering properly

#4 Post by PyTom » Mon Nov 08, 2021 11:07 pm

Can you put together a small unpacked demo that shows the problem, in 7.4.11 prerelease. I'll look into that and figure out what's going on.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], _ticlock_