3,2,1 counting

Get help using Construct 2

Post » Sun Aug 05, 2012 9:54 pm

Hello,

I am trying to figure one thing. When my level/layout start I want to start typical arcade counting like "3,2,1 go" and after that objects can star moving nut before that. What is the best wait to do that?

I mean all I need to know is how to get some time at start of layer, for example few second and during this no object can move.

I cannot use "system wait" because it affects only certain condition" right?Michal112012-08-05 21:56:36
B
8
S
2
Posts: 45
Reputation: 1,168

Post » Mon Aug 06, 2012 8:04 am

You can try to combine (be sure its not going to be the best idea xD) the "system wait" with a "global var".

Global var start = 0.

System wait 3sec. After that, change the global var start to 1, and wrap everythingelse in a "if conditional" in which you check the value of "start". If "start" is not 0, you can move or do what you want.
B
14
S
4
G
3
Posts: 106
Reputation: 4,792

Post » Mon Aug 06, 2012 10:26 am

If you want a countdown, you can set a variable on 3 and, using the "Every x seconds" condition, subtract 1 from the variable every second.

Now you can use that variable to show the 3, 2, 1, go countdown with your sprites or plain text.
B
33
S
12
G
7
Posts: 227
Reputation: 7,582

Post » Mon Aug 06, 2012 10:45 am

@sirLobito That works, but I think using a group would be neater :)

Make a variable - Countdown - with default value 3.
Create a text - txt_Countdown - make it say 3 for convenience

Put all your controls into a Group,
At the start of the layout, disable the entire group

"Every x seconds"
- Subtract 1 from Countdown
- Set txt_Countdown to Countdown
- Activate your group of controls
B
36
S
10
G
6
Posts: 948
Reputation: 11,101

Post » Mon Aug 06, 2012 11:23 am

Yeah @Rory!
Im the gears behind the "group" are a huge if, jajajaja, but, yes, thats more clever, thx ;)!
B
14
S
4
G
3
Posts: 106
Reputation: 4,792


Return to How do I....?

Who is online

Users browsing this forum: Aritz, mallorcaredes, ultrafop and 3 guests