How do I make a death counter ?

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

    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

  • 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.

  • 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 !

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Glad you found it!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)