Play sound mouse hover over button (not when hover leave area)...

0 favourites
  • 5 posts
From the Asset Store
Keyboard, Mouse & Typewriter SFX / 27 Unique Sound Clips
  • I have a condition when mouse hover over object to play a sound, HOWEVER the sound only plays AFTER the mouse exits the area/sprite.

    The reason this is odd is because I have other actions that happen AS SOON AS the mouse hovers, but the sound only plays after it exits hover.

    I tried making a boolean to make true when hover over object. If boolean true then play sound. That resulted in the exact same problem, playing sound after hover is over, not when hover starts.

    aNY iDEaS?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Not sure why it isn't working for you so decided to make a quick test:

    drive.google.com/file/d/1ml8vHFI01obDk5ljDXfP_QD1dJMEb6ah/view

    It appears to work fine. Note the "Trigger once" condition without which it would play the sound every tick whilst the mouse is over the sprite.

  • Not sure why it isn't working for you so decided to make a quick test:

    https://drive.google.com/file/d/1ml8vHFI01obDk5ljDXfP_QD1dJMEb6ah/view?usp=sharing

    It appears to work fine. Note the "Trigger once" condition without which it would play the sound every tick whilst the mouse is over the sprite.

    Big W. After adding the "Trigger once while true" condition it now works when first hover over. You gave me a better understand of how construct works, thank you very much for your help citron2010!!! Your project example is highly appreciated <3

  • My guess is that there's a short amount of silence at the start of your sound, so it WAS playing, but you heard nothing because it kept restarting before the silence ended.

  • I see what you're saying however that is not the case. I've edited the sounds with a software and cleaned all silences.

    I could leave the mouse hovering over the object for a minute and until I move it out then the sound plays. The issue was sound triggered after after leaving area rather than when entering the area!

    Your solution fixed that, thank you!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)