Shoot arrow from location to player

  • 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.

AlexWarrior

Member
Dec 5, 2020
14
0
1
34
Hey! So the goal for this skript is to have this ability type item that allows you to create a helper that will stand still and shoot arrows towards the victim

Skript:
Code:
on damage:
    if name of tool of attacker is "&c&lArcher Ability":
        create a citizen named "&c&l%attacker%&c&l's &c&lArcher" at attacker's location
        
        set {_npc} to last created citizen
        set {_npclocation} to attacker's location
        
        loop 10 times:
            wait 3 second
            
            set {_loc2} to victim's location
            summon an arrow at {_npclocation}
            set {_arrow} to spawned entity
            set {_vector} to new vector 0, 0, 0
            set velocity of {_arrow} to {_vector}
            shoot {_arrow} from {_npclocation} at speed 5 {_loc2}
        
        remove citizen {_npc}

No errors but the arrow is spawning in the npc and just landing on the ground, it does not get pushed or sent anywhere.

Addons:
Skellet-Legacy
SkLunar
SkRayFall

Is there a better way to do this?

Thanks.
 
Yes there is, using the addon skellet you can use:
Code:
shoot arrow from <location>
as an example if you want to shot and arrow from the player it will see like that
Code:
shoot arrow from player
Hope it helps.
 
Status
Not open for further replies.