[Solved] Add timer on 'mouse down' to delay create object

I’m trying to follow Wishforge’s tutorial > How to Create a Simple Game with Physics and Particles using GDevelop 5

I get stuck around 1.05:52 with the timers.

with the timer events. He seems to be using same line twice > The timer ‘CreateBlock’ is grater than 0.02 sec
This doesn’t work for me… I suspect his version of GDEVELOP is older than mine and the method has changed. I am currently using v5.2.169
I have tried a few things and looked for online tuts regarding Timers.

Hi, yes you are right. There were some changes. For a timer to work properly you have to initiate it first. So in your “At the beginning of the scene”-event block you have to use “Start (or reset) a timer”.

Thanks @Drona, I did this

Does this look right to you?
The behaviour feels a lot slower than Wishforge’s.

Yes, that looks good. I am not sure though, why the events are slow, you could check that with the profiler: Profile your game - GDevelop documentation

I’ve just noticed a duplicate

which I have removed.

What I feel is happening now… is there’s a pause (timer) before spawning… an not a pause between each object spawned… which is what Wishforge’s tut shows.

I briefly checked the video. He has other timers that he pauses. I would follow exactly his tutorial, the events are well visible at 01:03:43. You can also download the entire project from his itch-page. The only thing you need to change is to have the timer started before using its value in a condition.

Thanks @Drona.
Thanks for your help :slight_smile:

1 Like