[Timed events extension] Do every X seconds event

We have “do after x seconds” event, but we don’t have clean “do every x seconds” solution. Sure we can hack something like this by clever use of timers and variables, but we don’t have clean solution.

My suggestion is to make it part of Timed Events extension adding condition “Do every” which will take number parameter for seconds. Then actions inside event with Do every condition will be executed every X seconds exactly 1 time (if other conditions of event are met of course).

You have already an action in “Timed Event” categorie allowing you to reset the timed event. You just have to give a name to your timed event. :wink:

Bump. While Victor’s suggestion is valid, eventually you’ll run off recognizable names with ony names like abc3456 left. Also not everyone likes to build Rube Goldberg machines.

Yeah EVENTUALLY you’ll run out of names, but I’ve got games running into having hundreds of timers and I’m still not running out of names…

I usually call a timer “associated_event” and then if I make another timer related to the event either do “associated_event0” “associated_event1” etc… Or if I want to be more descriptive “associated_event_word”.

Examples:

timer “moveblock”
timer “moveblock0”
timer “moveblock1”
timer “moveblock2”
timer “moveblock3”
timer “moveblockmagic”
timer “moveblockyellow”
timer “moveblockgreen”

If not running out of names, then how about this:

Did such an event is really needed?
Think that timer gives you an opportunity to use a name and so to make sure that the meaning of the event is clear (by using nice name for your timers like “EnemiesCreation”, “RainGeneration”…). So not having this event type enforce good practice in a way :slight_smile:

See, that’s the thing about me: I don’t like to be enforced to do anything. I don’t like python because it enforces whitespace (though I usually use indentation anyway in my code). If I’d need to comment my event code, I’d use comment event type. Also I don’t like to build Rube Goldberg machines, unless I play Contraption Maker.

Still I need more arguments about why I should bloat Game Develop with such a feature whereas it can already be done with one condition and one action. :neutral_face:

Because you can’t just copy-paste event if you want to do similar thing with same delay.

E.g. you have two objects, Sun and Moon. Moon, by this “one event and an action” is turned on/off (by setting visibility) periodically, let’s say by 5 seconds. Now you want to change it for a Sun object as well. No, you can’t just copy-paste and change object in question to sun. You also need to change name of timed event, event that reset it and basically every other part of your Rube Goldberg machine. Now imagine that you need to do this to dozen different objects (or more).

Then you would need a dozen copy + paste and then to change 1 character in each timer name. Assuming you have the time in action and condition that makes for 24 char changes. If you can change one a second that takes… 24 seconds.

24 seconds which could be used for something useful, like finishing up level or making icon of game.