Make yourself a mute button (or a toggling sort of button in general)!

1

Stats

5,903 visits, 8,623 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 6 Apr, 2014. Last updated 19 Feb, 2019

Hi everyone!

So this might seem like a fairly straightforward tutorial but for the user who is beginner/intermediate this might help! I spent a lot of time and a lot of swearing to work this out and I thought I'd share for those in the future.

I wanted a button (and not one of Construct's pre-made ones) to mute sound and I wanted it clearly show when sound was on and when sound was off, so I created these on illustrator:

Using the Audio toggle silent function, I was able to get the functionality working but I couldn't work out how to change the image, until I finally worked out the answer: GLOBAL VARIABLES!

Yay.

Here's the event sheet:

It turns out, there is a very good tutorial on this already with an good explanation and other suggestions: https://www.scirra.com/tutorials/158/veryvariable-toggle-between-two-states (I wish I had found this sooner!)/i[https://www.scirra.com/tutorials/158/veryvariable-toggle-between-two-states]

If you want to see this button in action, check out this bad boy: http://bit.ly/heyshirley.

Hope this helped!

  • 0 Comments

Want to leave a comment? Login or Register an account!