Am making a level editor

How do I…

i made a level editor but when i add tiles to the game it will add on to of another tile ((overlapping)) i tried everything and every condition but it didn’t work

What is the expected result

I want it to click and drag to add tiles

What is the actual result

I just get it overlapping and repeted on top of it ((Because i didn’t want it to use “trigger once while true”))

Related screenshots

Hi HK_HOP.

You can simplify it if you create a group with your 3 objects and use the group name with a NOT condition.


https://wiki.gdevelop.io/gdevelop5/objects/object-groups/

When the condition is inverted it can be confusing. It’s not checking if the cursor is not on an object, it’s picking the objects the cursor isn’t on.

If there were 10 objects. The cursor is either on 1object (or more if they overlap) When it’s inverted it’s picking the objects it’s not on. So, it would be 10 objects minus any objects the cursor is on.

NOT inverts the result. If it’s false then NOT makes it True and vice-versa.

I did but it didn’t work

You did what?
Did you create a group, add the 3 objects to it and then use NOT is on groupName

yeah i did and didn’t work
the code logic is right, but it just doesn’t want to work

I don’t know why it’s not working. Can you post a screenshot of the current events.

This works for me.

Alternatively, you could use 1 object and change the animation to the variable or use create object by name using the variable.

I added a text object so I could verify it wasn’t stacking objects.

WAIT HOW
I DID THAT CODE AND DIDN’T WORK
BUT TODAY I DID IT AND IT WORKED

but maybe it was a mistake by me
by the way you saved my whole life thank you

1 Like