1
Ask a Question / Re: How do I create MUTE buttons?
« on: September 09, 2018, 08:42:28 am »This is certainly possible, but there's quite a lot to consider.
There are blocks under SOUNDS > CHANNELS that will let you affect the various channels.
You then need your various mute/unmute buttons to correspond to the correct channels.
It isn't actually difficult, but you need to think about how best to approach it. This might be difficult if you're new to Stencyl though.
I suppose you could create your mute/unmute buttons using a behaviour, assigning each to a unique actor attribute as they're created.
You can then refer to these actors later using the attributes you assigned them too. Depending how new to Stenycl you are, this may sound like gibberish, but once you've defined an actor (or in this case, a button) to an attribute, you can recall it as needed. You're also going to need booleans, one for each channel.
For example:
If mouse is clicked on BUTTON 1
If (boolean name) = true
Set (boolean name) to false
Set volume for channel 1 to 0%
If (boolean name) = false
Set (boolean name) to true
Set volume for channel 1 to 100%
Jeff you legend! I'll give this a whirl. I'm not too new to Stencyl and made a few games but this had me baffled. I haven't explored Boolean names before but they seem like a really good way of telling things how to behave so I'm looking forward to trying it. Thankyou!