Delay action as in construct 3

in construct 3 there is an action that pauses after the previous action and before the next one, for example

  1. move the player
  2. wait 2 seconds
  3. move the player

I would like to see this action in your constructor, I specify not an event, but an action

1 Like

This can be achieved using object timers, and only actioning a move after a timer has reached a specific value.

Hi take a look here maybe helps

in that extension and in the video, it uses several conditions and I need it to be in one condition like in my first post (there is an example)

Why would you need it in one condition? What you are mentioning is possible with a condition and an action using timers. Just because it doesn’t exactly match C3 isn’t really a huge deal.

2 Likes

for example, I will have a lot of things happening in one scenario, for example, 30 pieces if you create 30 events, it will be a complete confusion. and if you use these 30 scenarios in one event, after each delay it will be more or less akaratnym, otherwise in each new event of the tavimer you will have to create a new variable

although I may not understand something, but for example, in Gamemaker studio and CF 2.5 there are no such actions either, but only on the condition that it is in C3. I don’t understand why in most constructors except C3 there is no such action delay

1 Like

What you’re describing just means that instead of 1 item, there’s 2. That’s really not any more or less confusing than what you would have elsewhere.

The reason other engines don’t have it either is for the same reason, they use timers. The why is more that it helps you better understand timers as a base engine concept, which has a myriad of more uses.

If you’re dealing with objects, all you’d have to do is have a “The timer “delayblah” of Object is greater than (your seconds here)” condition, and then you add “Reset the timer “delayblah” of Object”" as the last action of the event.

If you’re dealing with stuff not related to objects, you’d do the same as above but just use the non-object specific events.

Having seen a lot of games guts, both in Unity, Unreal, Construct, Defold, and now GDevelop, it would be very rare for you to need 30+ delay timers.

All of the above said, I’m not the arbiter/decider on new features, I’m just posting here to add context to how you can do this today.

Admittedly though the wait action in Construct is very convenient and worth mentioning it is asynchronous and also put actions on wait in to a queue to be executed with a delay.

So in Construct we can do for example

If space key is pressed
wait 2 seconds
create bullet

And that’s it. If you press space 3 times, you get 3 bullets after 2 seconds.
While in GDevelop you need more complicated solution to achieve the same effect.

1 Like

Yeah, being asynchronous would mean a lot of work to implement something like that, since GDevelop (mostly) doesn’t support asynchronous events.

The added context helps, incase any dev/contributor wants to pick it up, assuming it’s feasible.

I still hope that the developers will add this function

Sure! I can understand the ask.

That said, I would strongly recommend you focus on learning the methods I listed above, because there’s no guarantee when/if new features are added, assuming it’s even considered viable.

ok i understand thank you very much

(to be clear, that feature is already requested and even has a bounty on it)

1 Like

by the way, you can also add a function such as a signal to that list, this is in Construct 3 there are actions a signal and waiting for a signal in the first case, this action allows you to make a signal that you need to continue further in the second case, this signal that needs to be executed so that the next scenario continues, for example in one event there is an action waiting for a signal and in order for this scenario to continue, you need to make a signal, for example, in another condition when you press, for example, some key On the keyboard, you make a signal and this signal is transmitted to the first condition where there is an action waiting for a signal

To add context, what you described is just setting a variable as an action, checking for the variable value in a condition in your other event.

That’s exactly how it works in Construct 3, they’re just renaming it. (It’s not even asynchronous in C3, apparently).

it doesn’t work for me as you told me he does all the actions right away

You can try the command <<wait 1>> or <<wait 0.5>> in Yarn dialog to achieve that there is no need to control the time between lines in a dialog with any external timer. Look Yarn documentation, note all Yarn commands must be written in lowercase Working With Commands | Yarn Spinner

Yes, I understand, but if you need, for example, to hide the dialogue for a while or move the player, or so on. here’s more action

It seems that for such purposes, at least someone told me that I don’t need to use 30 timers, I still have to use them, or I don’t understand anything yet.

by the way there in “Yarn” only two commands are used

Your screenshots isn’t really the right way to use timers nor conditions/actions, but a wait action wouldn’t work in your above screenshot either.

Please keep in mind if you’re trying to adapt Construct 3 style logic to GDevelop 5, it’s not going to work. C3 and GDevelop share similar styles of event sheets in visual appearance, but how they operate do not equate 1:1 in operation, or even 2:1. If you are trying to use the same logic/event setup from C3 in GDevelop, you need to remove that thought entirely. That’s not a goal of the engine and will lead you to run up against walls.

At best guess based off what you have here, you’d want text to move to the next line after 4 seconds total, then after 8 seconds total as well, then 12, etc. Correct?

The right way to do this is a single event that just checks the conditions of “Clipped text has completed scrolling” and “The timer “loldialogue” is greater than 4 seconds”, with your actions of “Go to the next dialogue line” and "Reset the timer “loldialogue”. One event, one timer, dialogue that goes to the next line every 4 seconds.

While I’m not sure why you’d be force scrolling text rather than allowing the player to choose when to move to the next line, the above is the right way to do that. I’m not sure what you’re trying to do with the other event actions in your screenshot, however.

If you’re just wanting 1 action in your screenshot to occur every 4 seconds, you don’t reset the timer at all until the end of your actions. You would still have multiple events in total, though, not one large event.

e.g. (I’m skipping your repeated next dialogue lines, but the logic would be the same. I also am not sure what you’re trying to do with the show/hide/play sound, but the general logic would be the same)

(Parent Event)  Clipped text has completed scrolling
     (Sub Event 1) The timer "lol" is greater than 4 seconds | Go to the next dialogue line
                   Trigger once                              |
     (Sub Event 2) The timer "lol" is greater than 8 seconds | Play the sound blah.wav, vol:100, loop: no
                   Trigger once                              |
     (Sub Event 3) The timer "lol" is greater than 12 seconds| Show s2
                   Trigger once                              |
     (Sub Event 4) The timer "lol" is greater than 16 seconds| Hide s2
                   Trigger once                              |
     (Sub Event 5) The timer "lol" is greater than 20 seconds| Open URL (or file) "ss"
                   Trigger once                              | Reset the timer "lol"

Again, one timer for this series of events. You’re not going to use only 1 timer for the entire game or anything, but one timer for a singular type of logic. It is still the same amount of events (and less, in some cases) than if you had a “wait” command".

The above logic may not be accurate for your goals as I can only go based off your screenshot. I would also not connect logic to dialogue AND a timer, as dialogue already works off its own behaviors and logic and you should probably be passing commands back to trigger events rather than just waiting, but that’s up to you to decide how to proceed with your game logic.

1 Like

My God. MY GOD. You are just a genius. your answer killed me yesterday when I was already in bed

I didn’t even know about such a thing AT ALL. It turns out that the timer starts seconds, that is, it starts and the time goes by. that is, if the timer is 4 seconds, then the first script is executed when it is for 8 seconds, then there will be the next script, and so on and so on. I didn’t think that this is how the timer works, even in other constructors.

But still. there is only one timer, but there are many events)))

Thank you very much for your reply

ps: DEATH C3 - HOLD THE GOLD GDevelop

ps2: Although maybe I’m a little early to say this)))