How do I disable an actor when he is invisible?
How do I disable an actor when he is invisible?
I can't find the answer through my searches. I have a menu that pops up when a button is pushed. The menu is always there though, so if a user were to touch the screen even when the menu is invisible, it still works. How do I disable it? I think I am on the right track, I created a attribute called disable menu but i must not be plugging it in right. Please point to me a resource if you know where one is!
I can't find the answer through my searches. I have a menu that pops up when a button is pushed. The menu is always there though, so if a user were to touch the screen even when the menu is invisible, it still works. How do I disable it? I think I am on the right track, I created a attribute called disable menu but i must not be plugging it in right. Please point to me a resource if you know where one is!
Comments
Well there's two things you could do.
1) change the screen size width to 960 other than 480 & position your menu on the left, & other scene on the right, and just switch the camera origin when you hit play etc.
2) create a game global boolean called Menu
Put in all your menu actors:
Rule: If game.Menu is true, change self.color.alpha to 1 and all your rules/behaviors
OTHERWISE: change self.color.alpha to 0
When play button is pressed change attribute Menu to false. When menu button is pressed, change to true.
Matt
when touch is pressed AND when self color alpha =1 ( all conditions valid)
that way when you change the alpha to 0 to make it invisible it disables the touch
when touch is pressed AND when self color alpha =1 ( all conditions valid)
that way when you change the alpha to 0 to make it invisible it disables the touch
@JohnPapiomitis Brilliant! I had not thought about it that way, going to try it now. Thanks!
________________
http://www.thatgameforum.com/
http://gshelper.com/
http://www.youtube.com/user/GameSaladCookbook#p/
http://gamesalad.com/wiki/
http://www.deepblueapps.com/Deep_Blue_Ideas_Ltd./Home.html
http://www.gamesalad.es/
http://thatgameforum.com/threads/gs-videos.360/
my email: calvin9403@hotmail.com
my skype: calvin9403
anyway choose it your self kewe