What does Touch Counts and Active mean?
ETGgames
Member, PRO Posts: 190
So yeah....I can't find it on the forums anywhere and I need a little help thanks.
Comments
Touch Counts means how many touches are currently active on a multitouch device.
Touch Active means, if a particular touch is active. So if you touch the screen with one finger, that is set for touch 1. Then you touch the screen with a second and the second touch is also active. When you remove the first finger, then touch 1 is no longer active but touch 2 still is.
Thanks, can you give an example of the touch active being used in a rule I'm still not 100% sure
My Games:
https://itunes.apple.com/us/developer/ethan-sarif-kattan/id825823924
https://play.google.com/store/apps/developer?id=ETG+Ltd.
Website: https://etggames.com
If you have an iPad, you can download Immune System Command for free to see it in action. This uses the Touch Active # to determine which position to send projectiles.
Here are a couple examples:
Rule: When Attribute game.Touches.Active.Touch 1 is true
--Change Attribute: game.TargetX to game.Touches.Touch 1.X
--Change Attribute: game.TargetY to game.Touches.Touch 1.Y
--Spawn Actor: Projectile (Which stores locally the game.TargetX and game.TargetY values) before moving to that position.
Rule: When Attribute game.Touches.Active.Touch 2 is true
--Change Attribute: game.TargetX to game.Touches.Touch 2.X
--Change Attribute: game.TargetY to game.Touches.Touch 2.Y
--Spawn Actor: Projectile (Which stores locally the game.TargetX and game.TargetY values) before moving to that position.
Having a set of those rules will let you do a rapid fire in multiple directions.
See my videos on multitouch.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Those videos were helpful and now I'm part way getting to my goal. Basically what i want to achieve is being able to move both joysticks i have on screen at once. Since the joysticks are on either end of the screen, I have used your 'if game.touch.touch1 < 368' etc and it kind of works but there are some really annoying bugs. First off, one of the joysticks only moves up and down until the other has been pressed at the same time as that joystick. Also, for the second joystick, after both have been pressed (before this doesn't happen), it requires a touch to be pressed on the first one as well for it to work otherwise it does nothing.
My Games:
https://itunes.apple.com/us/developer/ethan-sarif-kattan/id825823924
https://play.google.com/store/apps/developer?id=ETG+Ltd.
Website: https://etggames.com
http://gamesalad.com/manuals The Official Cross Platform Controller template may help you out. It was made a while ago but should give a good head start.
Thanks!
My Games:
https://itunes.apple.com/us/developer/ethan-sarif-kattan/id825823924
https://play.google.com/store/apps/developer?id=ETG+Ltd.
Website: https://etggames.com
Oh my god thats perfect its exactly what I have running in my game!!! ))
My Games:
https://itunes.apple.com/us/developer/ethan-sarif-kattan/id825823924
https://play.google.com/store/apps/developer?id=ETG+Ltd.
Website: https://etggames.com