#mouse hover statement is weird

1 messages · Page 1 of 1 (latest)

signal seal
#

idk if anyone will still be able to help with this but is there something about the mouse hover statements that are broken, because sometimes when i stop having the mouse hover, the outline on the block remains.

also when i made it play a sound it plays the sound a whole lot even though it in the middle of hovering, I'm assuming these bugs are happening because the game identifies my mouse as hovering over it multiple times (even if its already over the block), so I'm wondering how i can solve this.

meager cypress
signal seal
meager cypress
#

I don't really see anything wrong other than the approach to highlight parts upon mousehover

#

But I guess you're still a beginner so you do you

signal seal
#

i think it is good to learn even if im a beginner

#

(unless the code youre thinking is really complicated and difficult for me to understand

hasty scaffold
# signal seal oh, here

Ooh maybe either the event isn't really reliable or that there are like two "boxes" being cloned and like when you move your cursor away it only destroys one?

signal seal
#

okay

#

perhaps i can make a variable that detects if an outline has been placed?

#

like a childadded statement

hasty scaffold
#

You could use an ordinary print statement to check if the event is reliable, to see if it detects entry and leaving properly, and not like duplicates of the same statement first

#

Because I think what's happening is that you're moving in and out your cursor too quickly so it clones twice and it can only destroy one of it

signal seal
#

wait

#

maybe a simple fix is to enact a destroy twice?

#

let me test

hasty scaffold
#

Ummm no

#

I mean you could use a for loop for that but that wouldn't be a good fix for it

#

You could try checking if there is already an existing box when the mouse enters, and if there already is one, just like return or something so it doesn't clone a new copy

thorny siren
#

you should make the script client sided

#

server has a slight delay yk

signal seal
#

i think i might have to explore ray casting

signal seal
#

im gonna redo this script so that i can use it for any blocks

thorny siren
#

isn't the box supposed to be viewed by the user who are hovering over it tho

#

why make it server sided

signal seal
#

to learn ray casting and module scripts

thorny siren
#

idk this one doesnt really need raycasting

#

just getmouse from the client can get it workin well

hasty scaffold
#

i mean raycasting isn't really necessary for something small like this

#

wait um do you have a place file for it

thorny siren
#

hey can someone look over the bug i posted, i reposted it 2 times but no one say anything 💔

#

@hasty scaffold can you help?