rhg1968's Recent Forum Activity

  • I couldn't see where you defined the variable in the event sheet screen shots. If you want to have a local variable maintain it's value between tick event or each time the event sheet is executed, you need to mark the local variable as static. Otherwise it gets reset with time through the event sheet

  • One last thing I'll throw out. I can't tell from the screen shots you included if this event sheet is the main one or an included one. If it's not the main one, are you sure you included it ?

    Other than that I'm at a loss without being able to see the project.

  • Just to show you an example of using timers successfully in my project. Maybe it'll spark an idea for you.

  • Without being to play around with it I don't have much I can suggest.

    The only thing I can add is try again with the timers, they do work. I wonder if the issue is that you're setting the state while it's running. Try commenting out the is running event and enable the other 2 and set the state to sleep on layout start. Then time should fire and set the state to awake. Now if something else causes the state to switch back to sleep that's another story.

    If you want me to look at your actual project, I could give you my email so you aren't sharing your project with everyone. Just let me know.

  • Are you interacting with the wake up timer in any other spots in the event sheet ?

  • I also wanted to point out that if your expecting that timer to happen more than once it won't. The value of 8 is only being set once on the start of the layout.

  • I can try to look at it a little more, but without the context of the rest of event sheet, it's a little tough.

  • There are a few things going on here that you may need to look at:

    1. You set the animation to play from the beginning every tick.
    2. You are checking in numerous conditions if the state is equal to something and then setting equal to that in the actions
    3. You also check if the state is not equal to a bunch of things and then check if equal to something. All you need is check if it equals what you want.

    Give me a little more time to look it over in more detail

  • To be honest I would have to see the whole event sheet to see if variables are being reset or not.

    I use the built timer extensively in my game, as matter of fact, I have 3 of them running on one layout without issues in both the c2 and c3 runtimes.

    I certainly can help more if you could create a simple project that reproduces the issue, if you don't want to share this one, and provide a link to it via drop box, one drive, etc....

    I would be more than willing to look into it more

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I believe your issue is the trigger once condition. The less than zero check will only happen one time because of the trigger once. It'll set it to zero then never do it again. Both trigger once and <0 have to be true for the action to be carried out. Trigger once should only be used if you really only want it to be fired once.

  • Ashley

    Bump

  • it is a single-global plugin

rhg1968's avatar

rhg1968

Early Adopter

Member since 6 Jun, 2014

Twitter
rhg1968 has 9 followers

Trophy Case

  • 10-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies

Blogs