Make the same object do its thing separately from its copies

sorry if the title didn’t explain it properly, i just didn’t have enough space to write

basically i’m making a silly little platformer game and i want a dust sprite to appear, rotate, move in a random direction (via force) and gradually fade out whenever the player jumps from the ground. i’ve accomplished this after some trial and error, but i’ve noticed an issue- when there’s two or more dust sprites existing at once, the latest one stops doing any of that… it just appears, and slowly fades out (i have the fade out in a separate “repeat for each instance of dust” event, without any "trigger once"s, so maybe the trigger once is the problem? i need it to make it work properly though, so i can’t get rid of it. i tried doing that and the dust just appears for one frame and disappears after… maybe because it’s forcing the dust a certain distance infinitely or something? i even changed the force from permanent to instant)

i scanned over all my other events and didn’t find any problems anywhere else

Install the ObjectPickingTool extension, make your events look like this:


Make sure you get rid of the repeat for each instance loops.

hi, thank you so much for responding! i tried this, and the game stopped working. as in, the intro doesn’t play correctly and doesn’t continue into gameplay… it just gets softlocked. i’m really not sure how that happened, but it did. the game works fine when i disable these events though, except for the dust of course

That’s strange this worked perfectly for me, although in my test these were the only events so it’s possible something else in your events is interfering, do you mind posting all the events? If you don’t want to go through the hassle of making this work, I’m sure there are other options, but from what I saw when I ran these events it worked exactly as you described as what you wanted.

it seems to work fine when i test it on its own in a completely separate area, so it must be something in my events indeed
…sorry in advance for my terrible grasp on coding in general

this is just the intro, pretty simple, joey falls, splats and looks left and right a few times before gameplay begins

this image is self explanatory. horizontal movement, jumps and double jumps etc.

these events just make it so little tutorial button thingies show up when you’re near them and disappear when you leave. there was probably a simpler and more concise way to do this, but it works so it’s fine

these are just coins

and here’s the dust…
(i changed a few of the values but i doubt that’s what’s causing it)
and don’t mind the variable weirdness, it’s the only way i could find that makes it so that you don’t create dust when double jumping after falling off a ledge

oh and also this, but it’s probably not important

also, i really need to sleep (it’s super late) so i’ll look at your response tomorrow, thank you again for the help

This is a total shot in the dark but maybe it’s related to this:


You could try disabling these events and see what happens. If that doesn’t do anything I’m curious does the intro only stop when the player jumps?

I’ll be honest I didn’t expect for the intro to be so long and intricate, so I might not be the best person to troubleshoot this, hopefully someone with more experience can take a look at these screenshots and deduce the exact problem more accurately.

i tried this, and instead of the intro softlocking, the screen just stayed entirely black… this is so weird.
i read that the pick object extension might not be compatible with older versions of gdevelop so maybe mine is outdated? but that’d be weird because i tried this on the online version of it and the same thing happened

and, to answer your question, the intro stops here (when the intro variable is set to false)

Yeah black screen means something went very wrong, well crap I guess it’s back to the drawing board.

ah that’s alright, i think i found another way anyway! not quite sure how it worked out but i just deleted the pick first dust conditions and left the actions as is and it works now? maybe it’s something about how the dust is deleted when the tween ends?

edit: uh oh, the game freezes as soon as joey hits the ground in the intro now. i didn’t change anything and it just started happening

edit 2: never mind, i accidentally set the tween to rotate on the Z axis in my 2D game :')