How do I Create a health system based on a time countdown

Get help using Construct 2

Post » Tue Feb 02, 2016 1:49 pm

I'm looking to have a system based on a global time that starts at a certain number, say 600, and begins to countdown slowly, once it gets in the low numbers say 10 - 0, I want to have the player get hurt and or killed.

I have been looking in to number countdowns but I for the life of me cannot figure out how to associate Health with a timer. Could anyone point me in the right direction ? Any advice and or help would be great! :D
B
54
S
21
G
16
Posts: 82
Reputation: 12,005

Post » Tue Feb 02, 2016 3:36 pm

every x sec - 10 from life
on event + life
on event - more life
B
29
S
13
G
10
Posts: 355
Reputation: 8,312

Post » Tue Feb 02, 2016 5:03 pm

Carbincopy wrote:every x sec - 10 from life
on event + life
on event - more life


Thanks for the reply.

But this has me a little confused, if I set every x second - 10 from health than I cannot specify when the timer countdown actually hurts the player, as soon as you run the layout and it hits -10 seconds it hurts the player, I'm looking for a way so that when a timer goes down from say 600 once it gets to 30 = hurts player, 20 = hurts player etc. etc.
B
54
S
21
G
16
Posts: 82
Reputation: 12,005

Post » Tue Feb 02, 2016 5:24 pm

every x sec - from timer

if event timer - health
B
29
S
13
G
10
Posts: 355
Reputation: 8,312

Post » Wed Feb 03, 2016 3:04 am

It took me a few minutes to figure it out :P
But I do have a problem as I am trying to associate an image (heart) to the time thats taken away

Do I need to set it so that Health1 starts before the other two groups (Health2) & (Health3) ? Since, with the way I have it now it's counting both Health1 & Health2 every x seconds at the same time, I need to have it so that after Health1 x seconds finishes it starts the Health2 every x seconds. Thanks for the help man


PS : Fixed, major mistakes on my part! Thanks for the help @Carbincopy
B
54
S
21
G
16
Posts: 82
Reputation: 12,005

Post » Wed Feb 03, 2016 11:09 am

As I don't know how you have it setup. This will give a brief description of how it should look.

if health greater then 400 heart 1

if health less then 400 heart 2
if health greater then 200 heart 2

if health less then 200 heart 3

if health =0 then zero hearts

now you could get even more fancy
and set every 1/4 set animation to heart 1 (frame 1-4)
then that would call at every -50 since health is 600 and each heart has 200 points.
B
29
S
13
G
10
Posts: 355
Reputation: 8,312

Post » Wed Feb 03, 2016 11:13 am

You could even do it with a progress bar behind a see through image of hearts.
every x sec - from heart meter width
B
29
S
13
G
10
Posts: 355
Reputation: 8,312


Return to How do I....?

Who is online

Users browsing this forum: AllanR, bikachu, oosyrag, wirelesstkd and 1 guest