3 shot arrow/arrow going vertically

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

ItsAssasin

New Member
Jul 22, 2021
6
0
1
23
Hey! im doing weapons for my minigame and one of them is a bow that shoots 3 arrows (1 to the front, 1 to the left and 1 to the right) in the style of the hypixel skyblock's terminator.
The problem is that if i face towards north or east the arrows go correctly but if i look towards west or east the arrows go vertically, this is my skript:

Code:
       spawn arrow at player's head
       push last spawned arrow in direction of player at speed 2
       spawn arrow at player's head
       push last spawned entity in direction of player at speed 2
       push last spawned arrow right at speed 0.5
       spawn arrow at player's head
       push last spawned arrow in direction of player at speed 2
       push last spawned arrow left at speed 0.5

Thanks before response! :emoji_grinning:

Edit: I FIXED IT

If the player looks east or west i make the arrow go north or south and vice versa, here is the code
Code:
       set {_face} to player's horizontal facing
       shoot arrow at speed 2
       shoot arrow at speed 2
       if {_face} is north:
           push last shot arrow east at speed 0.5
       if {_face} is east:
           push last shot arrow south at speed 0.5
       if {_face} is south:
           push last shot arrow east at speed 0.5
       if {_face} is west:
           push last shot arrow south at speed 0.5
       shoot arrow at speed 2
       if {_face} is north:
           push last shot arrow west at speed 0.5
       if {_face} is east:
           push last shot arrow north at speed 0.5
       if {_face} is south:
           push last shot arrow west at speed 0.5
       if {_face} is west:
           push last shot arrow north at speed 0.5

I hope that someone finds this useful!
 
Last edited:
Status
Not open for further replies.