WHY IS THE THERE A EXPLOTION WHERE I DIDN"T PUT ANY?

Ok i have a game here where if the player is in collision with three different obj then create a particle at the X and Y position of Door bariar"s blast point (there is a bariar that prevents player from going through the door) BUT the problem is the particle does spawn at that position but it for some reason it spawn at a place were it’s not suppose to spawn and i didn’t put anythere there to spawn the particle

1 Like

Because in your actions you are deleting the door, and then you are creating particles at the door position, but the door is already deleted, that will cause the particles to spawn in 0X and 0Y, GDevelop read the events/Conditions and Actions from top to bottom.

The fix:
Just move the create particles action to the top (must be above the action Delete door) just like the SS below

3 Likes

it did not work i moved it up but still didn’t work

1 Like

Your screenshot is perfect example how to NOT name things
You have some name all capitals like animations and with space “ACTIVE 6”

Then you have object names wit whatever is name of this _ yet some are
presure_plate
While others PRESUR_PLATE
Then you have Door_BARIAR and point in it “blast”

I would check did you type all names in events correctly
Like check it few times

And don’t take it as something wrong
I say we all can learn a lot from it
Even if you did write it all correct
Then it really shows how it would be ultra easy to make stupid mistake

For example is it for sure ACTIVE 6 and not ACTIVE6 or ACTIVE_6
Or even Active 6 and so go on?

Being consistent helps avoid mistakes
In your case you need to do multiple checks

2 Likes
  • Make sure your Door object point name is “blast” no capital letters.
  • Try disabling the event that creates RedExplositon at the bottom (right-click on the event → Toggle disabled), and leave the one at the top, then see if it works.
  • Try disabling the event that creates RedExplositon at the top (right-click on the event → Toggle disabled), and leave the one at the bottom, then see if it works.
  • Make sure your object Door_BARIAR and BARIAR2 is in Base Layer.

If none of these helps, then recording a video showing the bug and the events, can help us understand the issue more and help you.

1 Like