Timer behavior - how it works?

This forum is currently in read-only mode.
From the Asset Store
_______ Huge collection of metal fixtures ________
  • Hi there, I'm unable to solve this one issue. I have set Timer behavior for object Elektropole (electric field) and I want to make it turn on and off using timers. Every elektropole should have different on/off interval.

    So I created this... http://dl.dropbox.com/u/3433127/Constru ... er%201.png

    And every time I run game game crasher after while (I think on On timer event - everything else was toggled off).

    When I try to debug, game crashes immediately saying that it is probably a bug in Construct.

    So, it is or I have weird thing in my script that causes crashes? In fact, I really dunno how to use timers, because there is absolutely no info on wiki or here. Thanx for advice.

    edit: ... and I'm using 99.82 without plugins.

  • Yay, you finally posted! Anyway, I thought you got the timer issue fixed after we went through it that time in chat?

    I don't know why it's crashing for you though.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It looks like you have the expression to call your length variable written incorrectly. It's written in your length field as 'vypnuto' when it should be showing Elektropole.Value('vypnuto'). Also, I don't believe you have to stop the timer in your On Timer trigger if you've set your timer to No Repeat.

    There used to be a bug in the Timer behavior where you couldn't start the Timer again from an On Timer event, but it was marked as fixed. It could be that it's not 100% fixed.

    At any rate, it's easy to set up your own timer, so you may want to consider doing that. I have an example here if you'd like to take a look:

    http://dl.dropbox.com/u/529356/customtimers.cap

    v0.99.83

    I've commented it so you can see how it works. It uses TimeDelta though, so if you're not familiar with the expression then I'd recommend checking out the wiki article.

  • Yay, you finally posted!

    > It's written in your length field as 'vypnuto' when it should be showing Elektropole.Value('vypnuto').

    > ell, I attempted to do it even how you are writing, but it gives me same crashes, so I tested and tested almost everything.

    > Also, I don't believe you have to stop the timer in your On Timer trigger if you've set your timer to No Repeat.

    > ven one of my tries. It helped once in other case, so I tested it even here.

    > There used to be a bug in the Timer behavior where you couldn't start the Timer again from an On Timer event, but it was marked as fixed. It could be that it's not 100% fixed.

    > really hope so, because I have strong failure feelings

    > At any rate, it's easy to set up your own timer, so you may want to consider doing that. I have an example here if you'd like to take a look: http://dl.dropbox.com/u/529356/customtimers.cap (99.83)

    > ep, it comes on my mind I really don't need timer behaviors at all... I just wanted to know, if I totaly suck in basic Construct scripting.

    > It uses TimeDelta though, so if you're not familiar with the expression then I'd recommend checking out the wiki article.

    > imeDelta is OK for me. Thank you.

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