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 if bow is named

Discussion in 'Skript' started by Aanesuto, Aug 2, 2022.

Tags:
Thread Status:
Not open for further replies.
  1. Aanesuto

    Aanesuto Member

    Joined:
    Aug 2, 2022
    Messages:
    1
    Likes Received:
    0
    Im new to this so i dont know much, and this seems simple but it doesn't work.

    Code (Text):
    1. on shoot:
    2.    if name of bow is "Sea Lance":
    3.        summon pig
    It doesn't register the name and when i name the bow that it doesn't summon a pig and skript says everything is fine.
     
  2. Best Answer:
    Post #2 by mordrowned, Aug 2, 2022
  3. mordrowned

    mordrowned Member

    Joined:
    Apr 22, 2021
    Messages:
    40
    Likes Received:
    2
    Yeh, an on shoot event doesn't have a bow expression. You can just use shooter's tool instead of bow in the code though. So.

    Code (Text):
    1. on shoot:
    2.    if name of shooter's tool is "Sea Lance":
    3.        summon pig
     
    #2 mordrowned, Aug 2, 2022
    Last edited: Aug 2, 2022
  4. ANormalCoconut

    ANormalCoconut New Member

    Joined:
    Aug 1, 2022
    Messages:
    8
    Likes Received:
    0
    or if you want a specific item like a tool or block

    1. Code (Text):
      1. on shoot:
      2.    if player is holding a bow named "Sea Lance":
      3.        summon pig
     
Thread Status:
Not open for further replies.

Share This Page

Loading...