Scene change problems (displaying image when not supposed to)

The menu is the first thing that is displayed, the menu has a help button, a play button, a credits button, an unlockables button, a sound button and a music button. The buttons all work and when changing screen the view them it works however it is when coming back from the different screens the problems occur. A large icon i have set to display when the sound is meant to be muted displays and covers the entire screen (note the menu buttons still work even though the large icon image is displayed). If the sound button is found behind the image and is toggled the icon disappears and if the sound is disabled altogether the scene transition works flawlessly so it is a problem with the sound yet i cant get my head around what is wrong with it. Help would be most appreciated.

Thanks

PS. Where can I go to to show you the images where you don't need to pay for

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    tinypic, imgur, imageshack, dropbox.

    I'm a little lost reading your description... what is your question?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • L EEvERL EEvER Member Posts: 5
    edited October 2015

    How to make it so the image that gets displayed doesn't get displayed when changing scenes

    http://tinypic.com/a/ustaa/1

    These images if you order them from oldest to newest are the steps visually of what I explained above. The last 2 are the code for the music and sound buttons

  • GnarlyGnarly canadaMember Posts: 840

    How is mute button triggered? Attribute? You may have to reset your attributes?

  • L EEvERL EEvER Member Posts: 5

    Clicking on the mute buttons changes integer attributes called "music_toggle" or "sound_toggle", depending on which button is pressed. These attributes start on "1"(hence having the sound on as default). When the button is clicked, the attribute is toggled to the opposite state. Within the buttons, there is a rule, If: game.music_toggle = 0 (off) Do: spawn actor. This actor is a white circle with a cross through it. This cross spawns on the mute button only when it has been toggled off. This mute function works perfectly. However, when switching from the main menu scene to the credits or unlocks screen, then back to the main menu, the white circle is shown across the entire screen. One can still operate the main menu, but one cannot see the main menu behind the white circle.

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

    @Eredra said:
    Clicking on the mute buttons changes integer attributes called "music_toggle" or "sound_toggle", depending on which button is pressed. These attributes start on "1"(hence having the sound on as default). When the button is clicked, the attribute is toggled to the opposite state . . . .

    There's no real need to duplicate attributes that already exist, GameSalad already has music and audio attributes which you can change the values of.

    Maybe you are doing something with the audio elsewhere in your game that I am unaware so maybe my point is not applicable here, but if I wanted music or sound to toggle on and off with a click I would simply use the attributes that already exist rather than making a second attribute that changes the sound/music attribute . . . . .

    When touch is pressed
    --change Sound Volume to 1-Sound Volume

    @Eredra said:
    Within the buttons, there is a rule, If: game.music_toggle = 0 (off) Do: spawn actor. This actor is a white circle with a cross through it. This cross spawns on the mute button only when it has been toggled off.

    Rather than spawning a new actor you could simply change the image of the current actor, so . . .

    When Sound Volume = 0
    --Change image to muted button image

    You could even simplify this further by naming your two muted/unmuted button images 0 and 1 . . .

    So the complete audio and image rule would need no spawning of new actors (and presumably destroying of actors once you return to unmated), no additional attributes or rules, it would look something like this . . .

    When touch is pressed
    --change Sound Volume to 1-Sound Volume
    --change Self.Image to Sound Volume

  • L EEvERL EEvER Member Posts: 5

    All of the suggestions so far have not worked, anyone got any other suggestions

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    When someone, especially someone as knowledgeable as @Socks, recommends a solution and you reply that is hasn't worked but don't give details, it's hard to know what to say in response. His suggestion does work but perhaps: you didn't implement it correctly (post a screenshot of your rules to verify), it's not what you had in mind (explain further what you need), it partially worked but didn't do everything you needed... etc.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited October 2015

    @L EEvER said:
    All of the suggestions so far have not worked, anyone got any other suggestions

    You need more understanding of how to code in GS. You should do some of the follow along lessons in the academy first and work your way up to making your own game.

Sign In or Register to comment.