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!

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

Solved Spawning non-moving items

Discussion in 'Requests' started by TPGamesNL, Jul 2, 2018.

  1. TPGamesNL

    TPGamesNL Well-Known Member

    Joined:
    Jan 20, 2018
    Messages:
    1,311
    Likes Received:
    73
    Medals:
    Category: Dropped items

    Suggested name: Not needed

    What I want:
    I want a function (or just the code) that spawns a item entity, without moving the item entity. I tried it myself with a few methods, but when I use the drop effect and after that teleporting it back to the original location (because drop item will give it velocity) won't work, because it's causes a visual glitch (so every client sees it moving and after that the item gets teleported). I also tried adding NBT for no motion after dropping the item, but that didn't work as well. I also tried spawning a dropped item with a preset NBT, but I didn't really know how it worked so I did work at first point but stopped working when I tried to add some variables. When I reset that back to the previous It still wasn't working. So I basically want a script that spawns non-moving items at a location from a variable.

    Ideas for commands: I don't really care, I just want the code.

    Ideas for permissions: Not needed

    When I'd like it by: A reasonable time

     
  2. Best Answer:
    Post #6 by ShaneBee, Jul 5, 2018
  3. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    There may be better ways to do this, but I just recently found out this way.
    You can use SkRayFalls holograms to do this. It has a Hologram OBJECT .... where it places an object floating that won't move and can not be picked up.
    I'd send the link for the docs, but apparently the docs page is down right now
     
  4. TPGamesNL

    TPGamesNL Well-Known Member

    Joined:
    Jan 20, 2018
    Messages:
    1,311
    Likes Received:
    73
    Medals:
  5. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    yes that is the one.... don't event BEGIN to ask me how this works, but it does haha!
    I just saw it as an example someone else used

    Code (Skript):
    1. create holo object "&aTEST;ItemStack:Gold Nugget;;" with id "testobject" at location 1 above player
     
  6. TPGamesNL

    TPGamesNL Well-Known Member

    Joined:
    Jan 20, 2018
    Messages:
    1,311
    Likes Received:
    73
    Medals:
    Any idea why this isn't working?
    Code (Skript):
    1. create holo object "&aTEST;ItemStack:Gold Nugget;;" with id "testobject" at {_loc}
    Also Is there a way to make players be able to pick up the items, because that's my main goal of this.
     
  7. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    Why not just do:
    Drop 1 of item at location without velocity
     
    • Like Like x 1
  8. TPGamesNL

    TPGamesNL Well-Known Member

    Joined:
    Jan 20, 2018
    Messages:
    1,311
    Likes Received:
    73
    Medals:
    Oh yeah. Well I spend like an hour trying to figure out how to it. Well next time I'm going to look at the syntax before trying it. Thanks
     
  9. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    Haha no problem
    I wish I had thought of that in the first place. I didn’t realize you wanted the player to be able to pickup the item.
     
Loading...