disable device touch when actor collides with something - SOLVED

Wonder MaruWonder Maru Member, PRO Posts: 98
edited April 2016 in Working with GS (Mac)

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

Comments

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    Just wrap your touches in a rule and use an attribute to lock it out when you want.

  • Wonder MaruWonder Maru Member, PRO Posts: 98

    @Lost_Oasis_Games said:
    Just wrap your touches in a rule and use an attribute to lock it out when you want.

    that is as easy as brilliant! I didn't think about that! I'm gonna try this. Pretty sure it will work!

    Thanks!!!

  • Wonder MaruWonder Maru Member, PRO Posts: 98

    @Lost_Oasis_Games said:
    Just wrap your touches in a rule and use an attribute to lock it out when you want.

    it worked great! 1 minute to do it. THANK YOU!

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    @Wonder Maru said:

    @Lost_Oasis_Games said:
    Just wrap your touches in a rule and use an attribute to lock it out when you want.

    that is as easy as brilliant! I didn't think about that! I'm gonna try this. Pretty sure it will work!

    Thanks!!!

    This technique is pretty straight forward logic. Glad you got it working.

Sign In or Register to comment.