Help syncing sound to a sprite with physics action

  • I need a "bounce" sound to play every time a sprite (with physics behavior) bounces off surrounding environment.

    The problem is the surrounding environment is a tileset, and I can't seem to figure out how to code it without doing a bunch of check tile ID code etc.

    Is there a simpler way to code it?

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Have you tried 'On Collision'? This should work with Tilemap. Something like:

    On Collision Tilemap -> Audio| Play "bounce" ....

  • Holy crap on a stick, thanks Asmodean! I was not thinking here. I thought I'd organize my code better than I have in the past and made a separate event sheet just for audio and used "functions" in the main event sheet to trigger those sounds. The OnFunction trigger doesn't allow another trigger (OnCollison) to be nested within it, so there was no OnCollision option, just overlaps. I spent way too long trying to find a way to use overlaps when I should have just replaced the function with the collision trigger. Aww, the beauty of tunnel vision... It's working perfectly now. Thanks for the quick response!

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