How do I make a death counter ?

Get help using Construct 2

Post » Sun Apr 09, 2017 4:41 pm

I don't know if I'm autistic or something but hell, I thought it would be as simple as something like :

Image

But no, as soon as the layout restard the text is reset, even tho its content is supposed to be the global variable Deaths. What the hell ?

Also, if someone know how to print the the time displayed by the Time Manager plugin, that'd be nice. Thank you, I'm curious to know what's wrong
B
5
Posts: 20
Reputation: 269

Post » Sun Apr 09, 2017 4:54 pm

If it's what I'm thinking it is, this will be a pretty easy fix. Move the "Set Deaths to Deaths +1" to before the Restart Layout event. :)

Also, I recommend changing your text updater to every tick instead of every second.
B
18
S
3
G
3
Posts: 82
Reputation: 2,543

Post » Sun Apr 09, 2017 4:59 pm

Thanks for answering ! Actually, I've tried that (the every tick + inverting events), but nope, still the same problem.

The counter is equal to 0 at the beginning.

I die, the counter is now 1.

Layout restarts, the counter is 0 again. What the...

EDIT : Sorry, I was being autistic. There was a "set Deaths to 0" condition in my "On start of layout". WTF was I thinking at the moment. Thanks for the help !
B
5
Posts: 20
Reputation: 269

Post » Sun Apr 09, 2017 6:48 pm

Glad you found it!
B
18
S
3
G
3
Posts: 82
Reputation: 2,543


Return to How do I....?

Who is online

Users browsing this forum: zenox98 and 11 guests