Make entity die after using ranged item once.

Started by lanto on Sun, 05/15/2022 - 21:45

Topic category: Help with modding (Java Edition)

Last seen on 22:06, 27. May 2022
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Make entity die after using ranged item once.
Sun, 05/15/2022 - 22:34 (edited)

To be more specific, i mean that if any entity uses this weapon in specific they instantly die.

I added this: https://ibb.co/zV4GsCM to the "When Ranged Item is Used" event inside the weapon, and it successfully kills me when i use the weapon, but doesn't kill the entity when it uses it.

I'm guessing this is because the entity isn't actually triggering the procedure because it isn't actually using the weapon, just shooting the bullets.

If that's the case, how do i make the entity run a procedure when shooting?

Edited by lanto on Sun, 05/15/2022 - 22:34
Last seen on 00:34, 15. Jun 2022
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
It looks like with the way…
Mon, 05/16/2022 - 23:39

It looks like with the way is set up it is trying to have the entity do /kill on itself,

Maybe instead you could do this?

https://imgur.com/lQZ830c

Last seen on 00:34, 15. Jun 2022
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Sorry forgot to answer the…
Mon, 05/16/2022 - 23:41

Sorry forgot to answer the actual question, I don't think its possible to have entities do / commands sense they aren't players

Last seen on 00:37, 29. May 2022
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Maybe try doing kill @s…
Tue, 05/24/2022 - 22:22

Maybe try doing kill @s instead of just kill, and if your wondering yes entities can run commands

Last seen on 19:18, 4. Jun 2022
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
entities can perform…
Tue, 05/31/2022 - 15:13

entities can perform commands and have the highest command level 4 because they don't by default use them however you may just set their health to 0