Timer to action


I started on GDevelop a few weeks ago.
Great app! Thanks to develop :)!

I block on something that may seem simple but I can not find the solution despite my research

In contact with an object, I display a text then I try to leave 2s for example and then to do another action (display an object for example)

The condition of colision does not concern me but the delay of 2 seconds to display my text blocks me.

So I have a condition colision that displays my text
At the beginning of the scene
Reset the timer “TPS”
Hide the object BulleTxtTape
Hide the object TxtTape

Avatar is in collision with Tape
Do = 100 to the height of Tape
Do = 100 to the widht of Tape
Show object BulleTxtTape
Show object TxtTape
Reset the timer “TPS”

I added a condition
The timer “TPS” is greater than 2 seconds
Show object TxtTape2

But as the application takes into account the conditional at the time of the reset timer, the aciton does not happen.

How could I do it?

thank you in advance

I understand you have a timer issue, but I don’t understand your exact problem. A few tips to explain your problem more clearly:

  • describe the actual result and the expected/desired result, using the actual names of your events (for example: “I want TxtTape to disappear for two seconds when Avatar collides with Tape”)
  • make a screenshot of your events instead of copying everything manually. Maybe you made a mistake while writing your events, maybe you made a mistake while copying the events here. Let’s avoid all that!
  • share a game screenshot when relevant (not really needed in this case).

From what I see of your events, my guess is that TxtTape2 shows even when there is no collision. Is that correct?


Thank you for your reply.
Sorry for the delay, the notification was in the spam.

Here are the events:

When the character touches the Tape object

  • the object is expanded (it’s ok)
  • the BulleTxtTape and TxtTape (text) objects appear (it’s ok)
  • After a delay of 2s, the object TxtTape2 appears (KO)

I want TxtTape2 to appear after the collision and after 2 seconds

Thank you

Indeed, you cannot make a timer is greater condition sub-event of a reset the timer action, because each time the events are executed, the timer is reset.
You can set a variable to 1 when the collision happens, reset the timer when that variable =1, and when variable=1 and timer > 2 secs, you can show object.

1 Like

It works this way.

Thank you for this information and your speed.