disable device touch when actor collides with something - SOLVED
Hello everyone,
In the game I'm working on I'd like to disable the touch after my actor collides on something.
I try to explain myself better
In the gif above you can see that when the actor collide with an obstacle I get that red layer and then I go to the game over screen.
Before getting to the game over screen, while the red layer is appearing and the "hit/lose" sound is playing, there is an interval of about 1 second or so. During that time, I can keep tapping on the screen and the enemies keep coming down.
To move things down, every enemy actor, has a rule where I say that for every touch on or off of it, they have to interpolate their Y position to Y minus something.
Is there a way to disable the touch when "game.gameover" is TRUE?
I thought this might be the easiest solution, but any other idea is welcome
PS: I tried to add a "when game.gameover is false" condition to the rule that makes enemies move down but it doesn't work, it makes the enemy stay fixed the original position since somehow it conflicts with the other 2 touch conditions.
Thanks for your help
Wonder Maru: casual games for casual people. www.wondermaru.com
Comments
Just wrap your touches in a rule and use an attribute to lock it out when you want.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
that is as easy as brilliant! I didn't think about that! I'm gonna try this. Pretty sure it will work!
Thanks!!!
Wonder Maru: casual games for casual people. www.wondermaru.com
it worked great! 1 minute to do it. THANK YOU!
Wonder Maru: casual games for casual people. www.wondermaru.com
This technique is pretty straight forward logic. Glad you got it working.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS