How do i make only one instance of an object be selected in events editor

how do i make only one instance of an object be selected in events editor i need to do this for money system i put money on the ground i made it so you can only collect it once and each moneys on the ground are the same object so whenever i collect one money it removes all the others from the game when i only collected one please help.

Hey! Don’t know what you are exactly talking about but if you want only obj2 colliding with obj1 to get deleted, you can do:
If obj1 is collision with obj2 then
Delete obj2

or do you want to delete all obj2 when collided with one instance:
Maybe there is a Pick all instance condition

yeah i tried the pick all instance but inverted and it didnt work it just made all the instance stay and i could infinity collect money lol thx for the suggestion tho

If you want to select one instance, just do
Is in collision
Delete

i jsut dont want to have to create a different object for each money because i would have to make the same conditions but for each object and that waould be a pain in the butt

You can do it with one object.

here i will send screen shot of code

my problem is i dont see any options for just one instance of an object

Saw your code and here what you should do:


The ones I marked on condition, you don’t need it. The ones marked on action, there aren’t any so you have to add one and that’s Delete money1

You don’t need it, and that’s because it is in default, just for one instance. The code is running for one instance.
For example: If obj1 is in collision with obj2 then Delete obj2
Now, this will not delete ever instance of obj2 when obj1 collides with one instance. It only deletes that particular instance that obj1 has collided with.

OMG i am so stupid lol it took me forever to do that code sry for bugging you cuz it worked

i should have thought of that the first time lol

Hahahahahahahahahahahahaha :smile:

also my game is top down and when you use pathfinding to move him he moves around the money even though its not marked as an obsicle how do u change this?

what! Isn’t he the player? Why is he having pathfinding behavior?

because i made it so he follows your mouse when you click

Oh! Why don’t you try to click on another position and see if he avoids it again.

yeah he only avoids it when you click at a different place and its in front of him he will go to it if you click on the money

but i think it might be annoying becuase if youre fllowing a path with money on it you would want to be able to click the end of the path and he will walk over and collect the money as hes going toward his destination