Create a countdown and a timer merged to an object

Get help using Construct 2

Post » Wed Mar 27, 2013 5:33 pm

Hi, folks.


I'm working on a low-fidelity prototype in Construct 2 but, despite having read a little about timer plug-ins and timers as a whole in Construct 2, i just can't seem to successfully integrate them to my prototype.

I am trying to accomplish two things in the following project:

First, create a condition stating that, in the beginning of the layout, one of the players will be randomly assigned a property that will place a timer on his square avatar. That timer would have, let's say, three seconds of duration.

After the end of that three seconds period, if the player with the timer on him didn't touch the other player, the layout would be restarted.

If the player with the timer on him managed to touch the other player's avatar before the three seconds run out, that burden would be transfered to the touched player, in a hot potato-like game.

Second, i've been trying to create a countdown to the play's start, in which a text showing 3, then 2, then 1 and Go would appear in the screen, and vanish just after.

Finally, the control to the avatars would be given at the end of this countdown.

Any clues on how to work those things in my prototype? Here follows its file:

http://speedy.sh/NDHTr/Test.capxOrwin2013-03-27 17:38:33
B
4
Posts: 11
Reputation: 347

Post » Wed Mar 27, 2013 5:49 pm

B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Wed Mar 27, 2013 5:56 pm

to second point, insert Text
set variable "secondsLeft" to the time left
in event sheet, set Text to secondsLeft (without quotes)
B
18
S
5
G
4
Posts: 568
Reputation: 5,079

Post » Wed Mar 27, 2013 6:39 pm

Hey, folks.

Sorry, Ramones. I am aware of that tutorial and it didn't help me at all.

I'll try your solution, California. Thank you!

B
4
Posts: 11
Reputation: 347

Post » Wed Mar 27, 2013 6:39 pm

*Finally, control to the avatars...*
B
4
Posts: 11
Reputation: 347

Post » Wed Mar 27, 2013 7:36 pm

I'm just assuming you don't have a licence, otherwise you can put both players in a family and simplify things a little.

tag.capx (r119)
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Thu Mar 28, 2013 1:13 pm

Hey, Ramones.


Indeed, i don't have a license. Actually, i'm a beginner and i don't even know what families do! I've downloaded your project and it gave me exactly what i wanted: i thank you deeply for that. Now i can test my game idea and see if it is feasible or not.


My sincere gratitude,
Orwin
B
4
Posts: 11
Reputation: 347

Post » Sat Mar 30, 2013 9:03 pm

Ramones,


Just a quick question: can you point me out to some link that deals with creating a kind of turbo speed feature? I was thinking about making those avatars run for a little while. For example, one buttom would be pressed and the avatars would move faster while spending a bar, much like as a car using its nitro.


Thank you!
B
4
Posts: 11
Reputation: 347

Post » Sun Mar 31, 2013 12:05 am

You can use the 'System: Set timescale' action to change the speed. 1 = normal, 2 = double speed, 0.5 = half etc. That changes the speed of everything in the game including timers.

You can also use 'System: Set object timescale' to change the timescale of individual players. Give each player a timer like the countdown timer. On key pressed - set player timescale to 2 and start the timer. When it reaches 0 - set timescale back to 1. The bar would be a Sprite or TiledBackground and you adjust it's width based on the timer value.

B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020


Return to How do I....?

Who is online

Users browsing this forum: spacedoubt and 4 guests