Any help appreciated :) (Timing, savestates)

This forum is currently in read-only mode.
  • Hi guys,

    I am working on a project and can do most what I want to achieve but there are some basics I can't quite figure out.

    First one is Grenades, How do you set a timer to an object so that once you spawn an object you start subtracting 1 every 5 ticks in a private variable, so that when it reaches zero I can tell it to destroy and do other stuff?

    Second one is save states, so I'm making a largish game and I have multiple layouts for different levels, but say I have a house and each room is a layout, I want to go in one room and kill everything but when I leave and enter the room again I want them to remain dead.

    Third one is similar, I exit one layout but when I re-enter the previous the player is at the beginning, I want the player to be where I exited the first layout originally.

    Any guidance would be sah-weeet!

    Cheers,

    Mik

  • Timer is a behavior, so you can add a timer behavior to an object if you want a timer. Then you can control it from events, you can activate it and set it to repeat itself and do whatever you want when it "ticks" by using the event "on Timer".

    I can't help you with the other ones becuase I'm new too

  • saving is complicated and there are a ton of ways to do it, arrays, ini, files check them out.

    for the grenade thing, remember you dont have to be counting down, you can simply add to a variable every 5 ticks and when its >/= "greater or equal" to whatever amount you want do all your stuff.

  • saving is complicated and there are a ton of ways to do it, arrays, ini, files check them out.

    for the grenade thing, remember you dont have to be counting down, you can simply add to a variable every 5 ticks and when its >/= "greater or equal" to whatever amount you want do all your stuff.

    AHHHHH of course greater or equal I totally didn't think of that...obviously, thanks for the help. I'll look into .ini files thanks for the tip.

    Timer is a behavior, so you can add a timer behavior to an object if you want a timer. Then you can control it from events, you can activate it and set it to repeat itself and do whatever you want when it "ticks" by using the event "on Timer".

    I can't help you with the other ones becuase I'm new too

    Thanks, I did look at that object but couldn't seem to do much with it, I'll explore it more.

  • if you're doing timers with events do NOT use ticks, DO use timedelta!

    This will ensure your grenades always take the same to detonate, no matter what computer the game is running in.

    Signed

    CEAT: Coalition for the Ethical Advancement of Timedelta

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • if you're doing timers with events do NOT use ticks, DO use timedelta!

    This will ensure your grenades always take the same to detonate, no matter what computer the game is running in.

    Signed

    CEAT: Coalition for the Ethical Advancement of Timedelta

    Yeah I'm getting into Timedelta stuff now I've used it before for regenerating ammo, works well.

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