Solved Projectile that damages over time

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

ChocoAura

Member
Jul 3, 2019
38
0
6
24
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:
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.
 
Status
Not open for further replies.