How do I make sprite buttons inactive for 2 seconds

Get help using Construct 2

Post » Thu Jan 08, 2015 3:34 pm

Hello,

I have made a button using a sprite, if sprite is touced an object is created. Fairly simple stuff
But I dont want to be able to spawn infinite amount of items.
How do I make sure the sprite (button) ignores input until the 2 seconds are over? (basically make it grey out for 2 seconds)

Best regards,

Philippopoulos
B
4
Posts: 2
Reputation: 204

Post » Thu Jan 08, 2015 5:25 pm

you can use a wait on the trigger for 2 seconds

https://www.scirra.com/tutorials/723/us ... t-in-loops
B
10
S
1
Posts: 54
Reputation: 677

Post » Thu Jan 08, 2015 7:17 pm

Use a 2 seconds timer. Start the timer once when the button is touched and deactivate the button. Set an On Timer event to reactivate the button.

Here's an example:
button-cooldown-example.capx
You do not have the required permissions to view the files attached to this post.
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
15
S
3
G
1
Posts: 329
Reputation: 2,012

Post » Thu Jan 08, 2015 8:55 pm

Thank you both very much, this was very helpful!
B
4
Posts: 2
Reputation: 204


Return to How do I....?

Who is online

Users browsing this forum: totoe, wizdigitech and 15 guests