[Solved] Damage numbers stuck

https://youtu.be/BygzRW2XrNc

Does anyone know why the damage numbers of the explosion are frozen? Also I feel a lil lag every time the explosion appears.

Are those the lines creating the larger numbers? This looks like the events for the damage not the “kill” events.

Yes, that’s the code for damage dealing and creating damage numbers appear
This is how the explosions are created:


and this is how an enemy dies:

I’m wondering if these lines need a trigger once. I’m thinking that they’re creating text objects on each frame. If a lot of objects are being created, that would explain the lag. Check the debugger. See how many text objects get created.

Just in case:
https://wiki.gdevelop.io/gdevelop5/interface/debugger/#launch-the-debugger

I had trigger once condition and same thing happend, so I switched it to the animation frame thingy.


I’ve checked the debugger and it does create more text objects than it should but 43 doesn’t seem like a lot?

And you’re positive there are no other events creating the 250 and 500 Text objects?

I made those events specifically for that, so yeah, I’m pretty sure. The only thing I haven’t shown is that those events are attached to “repeat for each instance of enemy”:


Maybe this is causing it? But i’m doing the same thing with player’s projectiles and that works fine.

The tween seems to be working for the smaller hit values. I still don’t see where the 250 and 500 are being added. I noticed some events were collapsed.

IDK you had a for each object event. Trigger onces might not be needed and they also sometimes cause issues when inside anything that loops.

IDK. I don’t see anything.

is there anyway I could share my entire “code”?

You can upload your project folder to.a filesharing site like google drive, you can then post a link to it here. Just make sure where you put it isn’t set to private or needs a password.

Okay, i found what was causing it.


When i deleted the “change the size of DamageText”, that fixed it
Thank you SO MUCH for your help and time

2 Likes