How to create a on or off button

2»

Comments

  • Phoenix256Phoenix256 Member Posts: 42

    the image didn't show up but it worked like it was going to

  • ArmellineArmelline Member, PRO Posts: 5,364

    Sorry that image isn't showing still. Perhaps it's best to wait until you're home and try the demos/post your image from there.

  • Phoenix256Phoenix256 Member Posts: 42

    don't have internet at home

  • As_Of_LatteAs_Of_Latte Member, BASIC Posts: 343

    @Armelline Just stumbled upon your toggle template and it looks perfect for what I need! One quick question, though :#...

    Is it possible to toggle on/off all sound effects at once? Maybe something like a game attribute, in apposition to individual self attributes per actor?

    For example:
    Toggle off = ALL sound effects throughout game - volume 0.
    Toggle on = ALL sound effects throughout game - volume 100.

    Hope I'm making sense, haha.

  • ArmellineArmelline Member, PRO Posts: 5,364

    @As Of Latte said:
    Is it possible to toggle on/off all sound effects at once? Maybe something like a game attribute, in apposition to individual self attributes per actor?

    Absolutely, a game attribute will do exactly what you need.

  • IceboxIcebox Member Posts: 1,485
    edited July 2015

    @Phoenix256 make an integer self attribute , call it switch ,

    make a rule , when touch is pressed
    change attribute self.switch to mod((self.switch+1),2)

    **This will change self.switch to 1 or 0 **

    then create a rule that says
    when attribute self.switch = 1

    change image & pause music

    otherwise
    change image & resume music

    now everytime you touch it it will trigger either 1 or 0 so if its one it will play music if its 0 it will pause. hope this helps

    Edit : i did not notice that this was an old thread sorry about that !

Sign In or Register to comment.