How can make a single actor turn a boolean on and off?

Dell7730Dell7730 Member, PRO Posts: 388

I wanna make a mute/unmute button and the only way I can think of is to make two actors replace itself back and forth, one to turn the boolean true and one to make it false.

Best Answer

  • SocksSocks London, UK.Posts: 12,822
    edited June 2015 Accepted Answer

    @Dell Agarpo said:
    and if touch is pressed again, will that change it back to recent state? I need one button that acts like a switch to on and off

    Do the maths ! :)

    If audio volume = 1

    Then what is 1-audio volume ?

Answers

  • SocksSocks London, UK.Member Posts: 12,822
    edited June 2015

    When touch is pressed change audio.volume to 1-audio.volume

  • Dell7730Dell7730 Member, PRO Posts: 388

    @Socks said:
    When touch is pressed change audio.volume to 1-audio.volume

    and if touch is pressed again, will that change it back to recent state? I need one button that acts like a switch to on and off

  • Dell7730Dell7730 Member, PRO Posts: 388

    @Socks said:
    Then what is 1-audio volume ?

    I got it, thanks.... can't get it straight the first time due to headache from sleepless nights coding or whatever, l

Sign In or Register to comment.