Changing Overlapping Images from On To Another

MarcusOMarcusO Member Posts: 147
I have a pause and play actor with their corresponding images.

I put both of these actors on top of the other.

The idea is to be able to change from one actor to the other actor and show there corresponding images.

So if i was to press the Pause actor image. the "Change Image" behaviour would bring out the Play actor
and when i press the Play actor image. the "Change Image" behaviour would bring out the Pause actor

However, I am only able to move from the Pause button to the Play button. When i go to click on the Play actor, the Pause actor doesn't come back up?

Any ideas???

Comments

  • scribblstudiosscribblstudios Member Posts: 118
    I would just use one actor and have this, when touch is pressed,"change attribute game paused to -game paused"
    (game paused would start at 1)

    If game paused=1 change image to pause
    If game paused=-1 change image to play

    Hope this helps!:)
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    scribblstudios said:
    I would just use one actor and have this, when touch is pressed,"change attribute game paused to -game paused"
    (game paused would start at 1)

    If game paused=1 change image to pause
    If game paused=-1 change image to play

    Hope this helps!:)

    On the right track but what you actually want to do is these to rules

    When touch is pressed
    --Change attribute Game.pause to (Game.pause+1)%2

    When Attribute game.pause = 1
    --Change image to pause
    Otherwise
    --Change image to play

    That ouch is pressed rule will cycle back and forth between 1 and 0 each time it is pressed. so it will start at 0 and when its paused it will be 1 and then when you touch it to unpause it will be 0 again. Although you know if you are actually using the pause behavior you will need this actor placed in both you pause scene as well as your game scene because you will not be able to touch the pause button in the scene when the pause behavior is active.
  • MarcusOMarcusO Member Posts: 147
    Both suggestions are very helpful. The changing of images back and forth between the two works.

    Thanks Guys.
  • MarcusOMarcusO Member Posts: 147
    Ok Guys, Check this out.

    I used the same rule as above from tenrdrmer.
    I can change back and forth between Pause and Play.

    I also added a Sound on and Sound mute functionality.
    I applying the same logic to the sound mute actor.

    What happens is puzzling. Yes the actors do change between sound muted and sound on but the paly and paus e buttons also change back and forth simultaneously???

    Whats going on here and how can i correct this???
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    You have left the rules from pause and play in the other button or you are using the same attribute for both
  • MarcusOMarcusO Member Posts: 147
    sorry i didn't think anybody was going to respond to this any more.

    I just put up another post about this problem...but to answer your question i'm using a different attribute i.e. Sound Muted.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Well the you have probably left the rules for the play and pause in that button also.

    you dont have those actors overlapping do you. it it possible you are just touching both at once.
  • MarcusOMarcusO Member Posts: 147
    same rules from the pause play in the other button...i have used the same logic but changed the variables and name etc. to be for the sound buttons.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    You need to double check it. There is a good chance you have missed one attribute somewhere.

    If you want post some screen shots of your rules. But unless you have left rules or attributes in there or have the play actor or an extra actor with those rules overlapping with the sound button there is no way they would interact.
  • MarcusOMarcusO Member Posts: 147
    Those actors are not over lapping. They are on opposite ends of the screen, so i couldn't touch both at the same time.
  • MarcusOMarcusO Member Posts: 147
    Also I just double checked it as suggested. and everything checks out; no missing attribute.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Post your screen shots man.

    I'm willing to bet you have missed something in one the actors They wouldn't never interact with each other otherwise
  • MarcusOMarcusO Member Posts: 147
    i just took 3 screen shots to post. I feel stupid for asking this but how can i post this here?
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    You have to upload it somewhere online or to a drop box file and then you can embed it using this code
    image

    Click quote to see the code

    And t has to be the actual URL of the image not a URL of a page the image is on.
  • MarcusOMarcusO Member Posts: 147
    upload it online. Ok where can i upload it too. Sorry, as you can see im new to this.
    Also, i cant see your code you have in you prior response.
  • MarcusOMarcusO Member Posts: 147
    better yet, do you have a emai address you can send me so i can just send them to you as an email attachment.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    I really dont have time to do any free work through email.

    Click quote on my post and you will see the code to post a image.
  • MarcusOMarcusO Member Posts: 147
    Hi There,
    I tried clicking quote. There mist be something wrong on my end clearly as i cant see the code. That sucks.. Oh well my loss.
    But thanks for your help for the time being. I appreciate it.
    I look forward to our interactions in the future.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Its not big code. Its right there when I click Quote one little line.

    Look at this thread is also says how to do it.

    http://gamesalad.com/forums/topic.php?id=33

    I'm sorry I can't give all my time for this. If you would like you can check out my project help service. But I really think your just missing something and can get it fixed from checking all your rules. including your otherwises.
Sign In or Register to comment.