Command to wait?

For questions about using Classic.

Post » Wed Jan 07, 2009 8:51 am

Hi, what's the command to wait a few seconds before the next one? For example, if in the game you are reloading, and you want it to wait about 3 seconds before you can fire again.
B
3
S
1
G
3
Posts: 105
Reputation: 1,312

Post » Wed Jan 07, 2009 9:13 am

Are you using the turret behavior?
If so you can change the reload time in the properties menu.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Wed Jan 07, 2009 9:35 am

No it's a top down shooter using the same kind of shooting as in the ghost shooter tutorial. I added the reloading in as an event (If r is pressed, go through the reload process)
B
3
S
1
G
3
Posts: 105
Reputation: 1,312

Post » Wed Jan 07, 2009 4:11 pm

When you press R, you could set a flag to disable shooting, and use 'Call function after delay' in the function object to call, for example, "EnableShooting" after 1 second.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Thu Jan 08, 2009 5:50 am

How do I set flags? Do I just use private variables or is there another way?
B
3
S
1
G
3
Posts: 105
Reputation: 1,312

Post » Thu Jan 08, 2009 11:20 am

A private variable is the best way, yes. When talking about flags as a programmer, we mean setting a variable to 0 or 1 :).
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest