This title is definitely misleading.
Basically, I have a feather.
This feather is named "&9Throwing Knife".
What I need it to do is shoot an arrow on right click that when it hits another player, they take damage over time for the next 3 or so seconds. I have everything working except the damage over time part. This is a kit I'm making which is why I can't just give them a bow and be done with it. Please help!
My code:
Right now the issue is that an entity cannot be used as a location. Earlier I made a code with no errors and yet that broadcast never went through.
Basically, I have a feather.
This feather is named "&9Throwing Knife".
What I need it to do is shoot an arrow on right click that when it hits another player, they take damage over time for the next 3 or so seconds. I have everything working except the damage over time part. This is a kit I'm making which is why I can't just give them a bow and be done with it. Please help!
My code:
Code:
on right click:
if held item of player is feather named "&9Throwing Knife":
remove 1 feather named "&9Throwing Knife" from inventory of player
shoot arrow from player at velocity 2
set name of last shot projectile to "throwingknife"
on projectile hit:
if event-location is a player:
if projectile is arrow with name "throwingknife":
broadcast "test"
Right now the issue is that an entity cannot be used as a location. Earlier I made a code with no errors and yet that broadcast never went through.