How to despawn a bullet

Started by Taptutupta on

Topic category: Help with modding (Java Edition)

Last seen on 22:41, 20. Jul 2022
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to despawn a bullet
Thu, 02/25/2021 - 09:55 (edited)

Hello

I want to make a limited range bullet (it will be a spell).

So in the event "While bullet flying tick" I assigned a script that despawns the bullet after some time. Except the problem is I don't know how to despawn this bullet. I tried "Despawn event / target entity" and the script despawning nearest entity. Nothing works :[ 

Edited by Taptutupta on Thu, 02/25/2021 - 09:55
Last seen on 19:15, 17. Mar 2021
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
have you tried source entity?
Wed, 02/24/2021 - 18:34

have you tried source entity?

Last seen on 22:41, 20. Jul 2022
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yes, I tried. This causes an…
Wed, 02/24/2021 - 18:49

Yes, I tried. This causes an error "Make sure to use the ones that the trigger you use provides"

Last seen on 22:41, 20. Jul 2022
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So maybe I'm using the wrong…
Thu, 02/25/2021 - 09:54

So maybe I'm using the wrong entity type. There is no entity for my bullet on the list. So I tried different types. Maybe this is my mistake - I'm using the wrong entiy type.

These are my trials:

zdj

Nothing works. Is there an all entitis type?

Last seen on 19:15, 17. Mar 2021
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
check there might be a…
Thu, 02/25/2021 - 15:14

check there might be a projectile check block?

Last seen on 22:41, 20. Jul 2022
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Okay. I have tried yet with…
Fri, 02/26/2021 - 09:32

Okay. I have tried yet with finding the correct entity type but haven't found it. So I solved it differently:
I have created a new entity that is fired towards the player's gaze. Velocity vector is recorded in NBT:zdj

In the tick update of this entity there is a script that gives the speed stored in NBT, and removes the entity after a few senunds:

zdj

pozdrawiam

Last seen on 19:15, 17. Mar 2021
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
great work!
Sat, 02/27/2021 - 02:27

great work!