Buttons/Sprites not working as expected

0 favourites
  • 5 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Hi everyone,

    So I'm just about ready to publish and share my game around various places, the game itself works really well apart from.... the sound buttons don't seem to want to work.

    I am aiming for two buttons on my main menu screen, one for music, one for general sound. When the user clicks/taps the button, it will stop the audio (bg music or general respectively) and a cross appears in front of the button. Then when they click/tap it again it will uncross the sprite and either start the bg music up again or simply allow the sfx to play during the game.

    I've got the buttons in place, I'm trying to switch to a second animation frame on click to show the cross on each one. Problem is nothing much else works.

    It might be a lot easier to show you what I mean, so if anybody could take a look at the below capx file and suggest where I've ballsed up that would be AMAZING.

    Ball Game capx

    It's not the easiest set of pages to navigate, but the sound button events are on the menuEvents page, at the bottom.

    Any help or suggestions would be so welcome, I'm pulling my hair out here!

  • try:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That's perfect, and such a quick reply too, thank you so much Korbaach, much appreciated!!!!

  • Here's an even quicker solution:

    On musicButton clicked:

    Set musicMute to 1 - musicMute

    musicButton - set animation frame to musicMute

  • korbaach's solution is better as it allows the user to toggle the button, where the other solution only sets the button once.

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