Click anywhere to...
jeffheif1
Member Posts: 10
My game contains one character who can move in only one direction. I currently have it so "when pressed" he moves forward. The only problem is that when I tested it on the iphone, the character was too small to accurately press him each time. Is there any way to make it so if you touch anywhere on the screen, the character will move forwards? I was thinking about making a clear actor over the whole screen, only to find out that there's not way to say "if clear actor receives touch, then move character", and then I was also thinking about making a clear character make a "moving credit" attribute set to 1, and then when the credit is 1, the character moves and the attribute is set to zero. The only problem I found is that when a lot of attributes are being used, the gameplay slows and it causes a much higher rate of glitches. if anyone has any solution to my problem or could help me brainstorm, that would be a huge help. Thanks!
jeffheif1
jeffheif1
Comments
If you wanted to just have to touch the actor, you would use "touch" ...or add "mouse is inside" to the "mouse down".
_______________
Nesen Probe http://itunes.apple.com/us/app/nesen-probe/id377766693?mt=8
Tickle Stones http://itunes.apple.com/us/app/tickle-stones/id363484260?mt=8
Food Fight! (free) http://itunes.apple.com/us/app/food-fight/id352646643?mt=8
In an invisible actor create a rule that says
When touch is pressed
change game.move to true (true is the same as 1)
Otherwise
change game.move to false (false is the same as 0)
Then in the moving actor have a rule that says
When game.move is true
Move
Now the invisible actor is communicating indirectly with the moving actor. This is really helpful for creating d-pads, joysticks, fire buttons, etc.