How do you save a score using time?

mexicanchango

  • Posts: 17
I am creating a game that runs forever until you die. So far I've been able to create a time in second, but I just need to know how to save the time as a score when my actor dies. I'm still new to stencyl. I've also attacked to picture of what I have so far.

Photics

  • *
  • Posts: 718
If the "Timer" attribute is a Game Attribute, then it should be easy.
If it's an actor attribute, the actor doesn't work if it's dead.
Michael Garofalohttp://photics.com – Author of The Interactive Stencyl Textbook 8)

mexicanchango

  • Posts: 17
What do you mean by that? When I test my game the timer works fine. What I'm trying to do is that if the player crashes, then the timer stops and that's your score. Sorry, I might be making this more complicated then it has to be, it's because I'm  a novice to stencyl as of right now.

Photics

  • *
  • Posts: 718
If the actor is alive, just stopped with a crash animation showing, something like the attached screenshot might work.
(Every .1 seconds was used to give a bigger range of points. For even more accuracy, a timestamp could be used, but that's more complicated.)

In the "Not" block, would be a "Crashed" attribute. If the actor is crashed, that's set to true.
Michael Garofalohttp://photics.com – Author of The Interactive Stencyl Textbook 8)