Touch Functions... Pressed Released etc...
cwbh10
Member Posts: 52
When I have one touch down (Controlling movement) and I want the other touch to do an action when release it won't let me. I hope that we can specify which touch number (1-11) that we want the rule to check for a release or pressed.
This is quite important to my game, and I feel like it should be an option.
This is quite important to my game, and I feel like it should be an option.
Comments
you need to setup a rule
When game.touches.count = 2
--change game.action to 1
a second rule
When game.action = 1
and game.touches.count < 2
--your desired action here
--Change game.action to 0
Thank you.
Rule:
When Attribute game.touches.count = 2
change attribute [touchcount] to equal 1
Rule:
When attribute [touchcount]=1 AND attribute game.touches.count<2
behavior: action you want to take place
change attribute [touchcount] = 0
You'll need to create an attribute (I called it touchcount, he called it game.action), and set it to 0 initially. Put the behaviors / rules that control what happens when the second touch is released into the first rule where I wrote "action you want to take place".
The final "change attribute" behavior is to reset it so when the second touch goes down again it can detect when it is removed.
So back to the topic, do you believe this might be put into a GameSalad Update?
Special Thanks to: Asymptoteell, tenrdrmer, and Marks!