tap to shoot timer..

aeroblaster4aeroblaster4 Member Posts: 7
edited November -1 in Working with GS (Mac)
Hey,
I've been trying to make a projectile fire at a tap location without people being able to spam it. For example, after a projectile is fired, even if the user is tapping, it won't fire until after at least five seconds and then a user tap. It forces the user to wait for the next shot. I've tried basically everything to do with timers.
Anyone know how I could implement this wait to tap again system?
Cheers,
Aero

Comments

  • DrGlickertDrGlickert Member Posts: 1,135
    The way that I do it is with a game.integer attribute.

    Game.Shot is what I call it. And the rule to "shoot" has a rule that the Game.Shot HAS to be = 0 for the player to shoot.

    You can use a timer or a game action (like a collision or something) to turn this back. So AFTER 5 seconds change attribute Game.Shoot to 0 or Rule: when projectile collides/overlaps with target then change attribute Game.Shoot to 0.

    That way the player can only shoot once at a time.
Sign In or Register to comment.