Music on/off with Button Image

azimpactazimpact Member Posts: 112
I'm trying to turn the music of with an image button. One image for off and one image for on so that only one image is showing at a time.

I've got the music playing when intering the scene and i've got it set so the main scene score attribute is 1.

I've got the first image placde on the scene with the press attribute to stop the music, change the image to the other image and change the score attribute to 0.

I can figure out how to place the rules for when they press the off button the first time, make it so that if they press the same button, only now a different image to restart the music and again swap the image.

Does that make sense?

Any help would be appreciated. I'm stuck..............

Comments

  • A3MGA3MG Member Posts: 152
    I use a game attribute to track if the music is on or music is off called g_music.

    For my button I have the following rule
    When g_music = 0
    change attribute g_music=1
    change image (to the one that says ON)
    play music - sound - loop
    Otherwise
    change attribute g_music = 0
    change image to (the one that says OFF)
    stop music

    Does that make sense? If you want some screen grabs send me an email davey(at)a3mg(dot)com

    - davey
Sign In or Register to comment.