1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved How to make Weapons

Discussion in 'Skript' started by Dxstin, Mar 11, 2021.

Thread Status:
Not open for further replies.
  1. Dxstin

    Dxstin Member

    Joined:
    Oct 1, 2020
    Messages:
    15
    Likes Received:
    1
    Hey,
    how to make weapons that shoot snowballs not only forward but also to the left or right, so I can make a shotgun for example?

    Thanks already for any answer!
     
  2. Best Answer:
    Post #2 by couger44, Mar 11, 2021
  3. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    714
    Likes Received:
    31
    This is a basic code, but it does what you want.

    Code (Skript):
    1. on right click with diamond hoe:
    2.     if name of player's held item is "&6Shotgun":
    3.         set {shotgun.bullets.%player%} to 4
    4.         shoot snowball from the player at speed 2
    5.         push last shot snowball upwards with speed 0.06
    6.         shoot snowball from the player at speed 2
    7.         push last shot snowball downwards with speed 0.09
    8.         shoot snowball from the player at speed 2
    9.         push last shot snowball left with speed 0.06
    10.         shoot snowball from the player at speed 2
    11.         push last shot snowball right with speed 0.06
    12.        
    13. on damage:
    14.     if event-projectile is snowball:
    15.         {shotgun.bullets.%shooter%} is 4:
    16.             damage victim by 4
     
  4. Dxstin

    Dxstin Member

    Joined:
    Oct 1, 2020
    Messages:
    15
    Likes Received:
    1
    Thank you! It worked!
     
  5. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    714
    Likes Received:
    31
    You're welcome.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...