Wait after X seconds before initializing an action

Get help using Construct 2

Post » Sat Jun 09, 2012 8:31 am

Greetings.

I would like to know what is the simplest way to execute an action x seconds after the condition has been written.

for example :
keyboard - ctrl is down
   - wait for 5 sec
      -> spawn bullet

Hope you'll help me ! Canapin2012-06-09 08:31:57
B
5
S
1
Posts: 34
Reputation: 1,026

Post » Sat Jun 09, 2012 9:20 am

It is the correct way to do so.
The system action "Wait" is what you want. http://www.scirra.com/tutorials/56/how-to-use-the-system-wait-action

But beware, for any tick that the ctrl key is down will, 5 seconds later, spawn a bullet.
So if you keep the ctrl button down for 30 ticks, 5 seconds later 30 bullets will be spawnt in a row.Kyatric2012-06-09 09:43:30
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
270
S
98
G
70
Posts: 7,267
Reputation: 75,644

Post » Sat Jun 09, 2012 9:31 am

hmm you want hold on ctrl or just one click??? because the game will looks weird when you click then wait 5seconds then create bullet but if its hold ctrl and create bullet every 5 seconds its much better i think

the one you said is (one click )
B
52
S
15
G
6
Posts: 795
Reputation: 12,270

Post » Sat Jun 09, 2012 11:41 am

The wait action is perfect. I first thought it was a condition, but it's not and that's what I needed. :D
B
5
S
1
Posts: 34
Reputation: 1,026


Return to How do I....?

Who is online

Users browsing this forum: skrotar and 11 guests