Need help with making buttons touchable
goodfutures
Member Posts: 4
hello,
I want help please someone teach me about button works.
I want make 1 to 10 button and first touch No:1button then you can touch next No:2 button. like this works.
please teach me.
I want help please someone teach me about button works.
I want make 1 to 10 button and first touch No:1button then you can touch next No:2 button. like this works.
please teach me.
Comments
Hello @goodfutures and welcome to the Forums. :-)
First to say, get into the habit of making descriptive titles for your threads. "please help me!!!" doesn't help anyone to know what your question is; some people will just ignore it.
So, your problem: here's one way to solve it. first make an integer attribute and call it Order.
Next make an actor.
Title it button00.
Double-click it in the Inspector to open up its editing page; put this into it's Rules:
When touch is pressed and Order =0 and self.Color.Blue = 1
Change Attribute Order to Order+1
Change Attribute self.Color.Blue to 0
Now drag out ten actors onto your scene. Double click the actors in the order you require, and name them button01, button02, button03, etc., up to 10.
After changing the name each time, unlock the prototype; amend the rules as follows:
--- for button01:
---as above, no change
--- for button02:
When touch is pressed and Order =1 and self.Color.Blue = 1
Change Attribute Order to Order+1
Change Attribute self.Color.Blue to 0
--- for button03:
When touch is pressed and Order =2 and self.Color.Blue = 1
Change Attribute Order to Order+1
Change Attribute self.Color.Blue to 0
----etc.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps