How to despawn a bullet

Started by Taptutupta on

Topic category: Help with Minecraft modding (Java Edition)

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
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?

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"

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?

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?

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