Time in your Game

Get help using Construct 2

Post » Sun Jan 12, 2014 8:40 am

Hey! guys I have a question would you help me out?

How I can Make a Timer Count down?
The time has 15sec only, then I have to destroy 5 objects
if the time is equals to 15 or greater than 10sec while done destroying the 5 objects a text will appear saying "Awesome" when it is equals to 10 or greater than 5 a text will appear saying "Great" and lastly when it is equal to 5 or greater than 0 it will say "Good".
B
4
Posts: 6
Reputation: 219

Post » Sun Jan 12, 2014 10:03 am

I noticed you already saw my simple countdown timer example.

All you'd have to do is check if your objects are being destroyed.

for example:
Set TimeRemainingInSeconds to 15
Create a Global variable ObjectsDestroyed

on object destroyed add 1 to variable ObjectsDestroyed

system compare variable ObjectsDestroyed= 5
system trigger once
- system compare two values: TimeRemainingInSeconds > 0
-- system set text to : "Good"
- system compare two values: TimeRemainingInSeconds > 5
-- system set text to : "Great"
- system compare two values: TimeRemainingInSeconds > 10
-- system set text to : "Awesome"
- system compare two values: TimeRemainingInSeconds = 0
-- system set text to : "You failed!"
LittleStain2014-01-12 10:04:24
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Jan 12, 2014 11:05 am

Cant you use the built in Timer Behaviour?

Its purpose built for Multiple Timed operations...

Just add it to any Sprite in the game or object such as a Text object or Sprite font...that way you can have an onscreen timer by using the Set Text function

When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
35
S
13
G
8
Posts: 318
Reputation: 7,685

Post » Sun Jan 12, 2014 11:57 pm

Thank you. I will try what you have given to me...
B
4
Posts: 6
Reputation: 219

Post » Mon Jan 13, 2014 5:10 am

Can you give a sample capx instead. I can't understand. It is highly appreciated. thanks
B
4
Posts: 6
Reputation: 219


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 38 guests