Changing Overlapping Images from On To Another
MarcusO
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???
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
(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!:)
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.
Thanks Guys.
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???
I just put up another post about this problem...but to answer your question i'm using a different attribute i.e. Sound Muted.
you dont have those actors overlapping do you. it it possible you are just touching both at once.
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.
I'm willing to bet you have missed something in one the actors They wouldn't never interact with each other otherwise
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.
Also, i cant see your code you have in you prior response.
Click quote on my post and you will see the code to post a image.
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.
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.