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

Custom Projectile

Discussion in 'Skript' started by EPicAnid, Aug 13, 2019.

  1. E

    EPicAnid Member

    Joined:
    Aug 9, 2019
    Messages:
    7
    Likes Received:
    0
    I would like to make fish throw-able via right clicking. I have tried to spawn an invisible armor stand holding a fish ridding an invisible snowball, however I have been unsuccessful anyone know how to do this?
    --- Double Post Merged, Aug 13, 2019, Original Post Date: Aug 13, 2019 ---
    bump
     
  2. malia

    malia Well-Known Member

    Joined:
    Jul 24, 2019
    Messages:
    189
    Likes Received:
    17
    Didn't test, nor even sure if it's possible but here you go:
    Code (Text):
    1. on right click with fish:
    2.   throw ender pearl:
    3.     set last thrown entity to fish
     
  3. E

    EPicAnid Member

    Joined:
    Aug 9, 2019
    Messages:
    7
    Likes Received:
    0
    If only it was that simple.....
    --- Double Post Merged, Aug 13, 2019, Original Post Date: Aug 13, 2019 ---
    lol I just solved my own problem on my own. but now I have another one

    so currently, I am using the on right click command to detect right clicks, however this only works if I am right-clicking a solid block. I would like my command to trigger when right clicking air how would I do this?
     
  4. malia

    malia Well-Known Member

    Joined:
    Jul 24, 2019
    Messages:
    189
    Likes Received:
    17
    How about some tasty ass code
     
  5. E

    EPicAnid Member

    Joined:
    Aug 9, 2019
    Messages:
    7
    Likes Received:
    0

    my code so far is mildly complicated, however with a few tweaks could acomplish my goals take a look:


    Code (Text):
    1. on rightclick with fish:
    2.     if world is "Aquarium":
    3.         shoot an egg from player with speed 1
    4.         loop all entities in radius 2 of player:
    5.             loop-entity is an egg
    6.             set {_entity} to loop-entity
    7.             exit loop
    8.         spawn an armor stand at block 100 meters above player
    9.         apply invisibility 2 to the spawned armor stand
    10.         make spawned armor stand ride {_entity}
    11.  
    12.  
    I currently need a way to actually give the armor stand invisibility, as of now that part of the command is not working. I also would need to give the armor stand a fish to hold. My issue above still applies too
     
    • Creative Creative x 1
  6. malia

    malia Well-Known Member

    Joined:
    Jul 24, 2019
    Messages:
    189
    Likes Received:
    17
    Code (Skript):
    1. on right click on air:
    2.     if player is holding a fish:
    3.         # do shit
     
  7. E

    EPicAnid Member

    Joined:
    Aug 9, 2019
    Messages:
    7
    Likes Received:
    0
    I'll give this a shot thx :emoji_slight_smile:
    --- Double Post Merged, Aug 15, 2019 at 10:12 PM, Original Post Date: Aug 14, 2019 at 12:31 AM ---
    doesn't work

    ;-;
     
  8. Revelationage

    Revelationage Well-Known Member

    Joined:
    Jan 27, 2017
    Messages:
    106
    Likes Received:
    9
    You can make the armor stand invisible by using NBT tags.
    Code (Skript):
    1. add "{Invisible:1}" to entity-nbt of last spawned armor stand
    Requires Sk-NBeet
     
  9. E

    EPicAnid Member

    Joined:
    Aug 9, 2019
    Messages:
    7
    Likes Received:
    0
    I will give that a shot
    thanks

    do you know anything about giving the armor stand a fish?
     
  10. Revelationage

    Revelationage Well-Known Member

    Joined:
    Jan 27, 2017
    Messages:
    106
    Likes Received:
    9
    Just holding the fish in its hand?
     
  11. E

    EPicAnid Member

    Joined:
    Aug 9, 2019
    Messages:
    7
    Likes Received:
    0
    yep
     
  12. Revelationage

    Revelationage Well-Known Member

    Joined:
    Jan 27, 2017
    Messages:
    106
    Likes Received:
    9
    Code (Skript):
    1. set held item of last spawned armor stand to %itemstack%
     
Loading...