Destroy particles on collision

Started by Baboobraz on

Topic category: Help with modding (Java Edition)

Last seen on 23:06, 1. Dec 2023
Joined Feb 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Destroy particles on collision

I have a particle of petals falling from leaves, and I want to destroy them when they hit any block that isn't the leaf block, because right now they just spin in circles on the ground until they die. How can I do this?

Last seen on 15:44, 30. Jul 2024
Joined Jul 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
add a condition to the …
Thu, 06/09/2022 - 23:32

add a condition to the "additional expiry condition" in the particle editor

the way conditions work is that you check if a thing is true, then return true, which will make it do the thing

then put a return false block outside of the condition, but with no condition around it, so that it always defaults to not doing the thing

in this case the thing is the particle disappearing

in the "advanced" section, there's a blue thing that says "dependencyName", replace dependencyName with onGround and put that in your condition

if you see onGround pop up on the right in the required dependencies list, you are doin it right

Last seen on 15:44, 30. Jul 2024
Joined Jul 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
if that doesn't work, then…
Thu, 06/09/2022 - 23:33

if that doesn't work, then check if the block at its position is not leaves

Last seen on 03:10, 30. Sep 2024
Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@91arrows can you explain…
Sat, 07/27/2024 - 19:02

@91arrows can you explain this with an image? What do you mean by return true/false blocks? I have "If Logic dependency (onGround) = True Do..." but nothing happens, presumably because the trigger doesn't know what entity/particle/whatever even has the onGround dependency to check for.

Last seen on 21:06, 17. Sep 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I haven't tested this yet,…
Sat, 07/27/2024 - 20:51

I haven't tested this yet, but it should work:

The procedure

And the procedure goes in here:

The procedure location

(Remember to also have "Does particle collide" enabled as well)

Last seen on 03:10, 30. Sep 2024
Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@WolfyTheModCreator I should…
Sun, 07/28/2024 - 14:34

@WolfyTheModCreator I should mention that I am not OP. I would actually like for my particles to disappear when they hit the ground and spawn a block where they land. If I put a print statement inside the if do, I never see anything output to the console. It's like onGround doesn't exist (or it is always false).

Last seen on 03:10, 30. Sep 2024
Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@WolfyTheModCreator Ah, you…
Sun, 07/28/2024 - 14:45

@WolfyTheModCreator Ah, you know what. I think the problem was when I did what you said to do, I had to go back into the particle window and change the "Additional particle expiry condition"  from "(no additional condition)" to the one now created. I thought that there was a bug in MCreator because I could not get any other procedure in the drop down except "(no additional condition)" UNTIL the [Return logic] blocks were added. So this works! Thank you!