Started by
Taptutupta
on
Topic category: Help with Minecraft modding (Java Edition)
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
have you tried source entity?
Yes, I tried. This causes an error "Make sure to use the ones that the trigger you use provides"
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:
Nothing works. Is there an all entitis type?
check there might be a projectile check block?
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:
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:
pozdrawiam
great work!