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 Item on ground name PLZ HELP

Discussion in 'Skript' started by chimchambi, Jan 22, 2020.

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

    chimchambi Member

    Joined:
    Dec 4, 2019
    Messages:
    30
    Likes Received:
    0
    How do i check if dropped item is a specific item. I have tried "if loop-entity is stone" but doesn't work and i have tried so many other things plz help

    example
    on rightclick:
    loop all dropped items in radius 5 around location of event-block:
    #check the specific dropped/looped item



    EDIT: (solved)

    command /test:
    trigger:
    loop all dropped items in radius 30 around location of player:

    if "%item of entity loop-entity%" is "cactus":
    broadcast "cactus is on the ground"
     
    #1 chimchambi, Jan 22, 2020
    Last edited: Jan 26, 2020
  2. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    222
    A dropped item is not an item, its actually an entity, so you have to use the Item of an Entity expression
     
  3. chimchambi

    chimchambi Member

    Joined:
    Dec 4, 2019
    Messages:
    30
    Likes Received:
    0
    well.. sorry but dont quit undestand....

    any chance that you can help me with the codeline??

    I am trying to get a specific or more items to check if its looped

    would really appricate your help <3
    --- Double Post Merged, Jan 23, 2020, Original Post Date: Jan 23, 2020 ---
    anyone?
    --- Double Post Merged, Jan 24, 2020 ---
    plz someone help
    --- Double Post Merged, Jan 25, 2020 ---
    bump?
     
  4. PanHack

    PanHack Active Member

    Joined:
    Dec 18, 2019
    Messages:
    143
    Likes Received:
    8
    what exactly do you need because i quite dont understand what you wrote.
    You want to check items on ground ?
     
  5. chimchambi

    chimchambi Member

    Joined:
    Dec 4, 2019
    Messages:
    30
    Likes Received:
    0
    Okay hi.

    So i am trying to loop some items on the ground in a radius and check if the looped item on ground is cactus or something else

    but i dont know how to do it and i have tried everything i could but nothing works.

    Here is my code so far


    loop {hopper.location::*}:


    set {_count} to 0
    #loop all dropped items in radius 30 around location of loop-value-1:
    loop all entities in radius 30 around location of loop-value-1 where [entity input is a dropped item]:
    #check if the looped item on ground is cactus or something else (but i dont know how to)
    #my coder after it check




    I really hope you can help me plz
     
    • Friendly Friendly x 1
  6. Philotastisch

    Philotastisch Member

    Joined:
    Sep 25, 2019
    Messages:
    45
    Likes Received:
    0
    Code (Text):
    1. Every ... Ticks:
    2.      Loop all Players:
    3.           Loop all entitys in Radius 5 arround loop-player:
    4.                If loop-entity is ...:
    5.                     #Your code
    I don't Testes it before.
     
  7. chimchambi

    chimchambi Member

    Joined:
    Dec 4, 2019
    Messages:
    30
    Likes Received:
    0
    so the loop-entity on dropped item is "Dropped item" i can't check if the dropped item is a specific item... how do i do that?
     
    • Useful Useful x 1
  8. Philotastisch

    Philotastisch Member

    Joined:
    Sep 25, 2019
    Messages:
    45
    Likes Received:
    0
  9. chimchambi

    chimchambi Member

    Joined:
    Dec 4, 2019
    Messages:
    30
    Likes Received:
    0
    I am trying to get it everytime a item is spawned/is on the ground not when you use the on drop event :emoji_slight_smile:
     
  10. chimchambi

    chimchambi Member

    Joined:
    Dec 4, 2019
    Messages:
    30
    Likes Received:
    0
    Mhh gives me an error when i am trying to use it "Can't understand this expression: items within loop-entity (test.sk, line 46: if "%items within loop-entity%" is "spawn_egg":')"
     
  11. PanHack

    PanHack Active Member

    Joined:
    Dec 18, 2019
    Messages:
    143
    Likes Received:
    8
    this script tells you if there is item on ground
    Code (Text):
    1. on rightclick with a stick:
    2.     loop all dropped items in radius 5 of event-block:
    3.         if {_arg1} is not set:
    4.             set {_arg1} to true
    5.             send "item" to player
    6.         else:
    7.             set {_arg1} to false
    8.             send "no item" to player
     
  12. Philotastisch

    Philotastisch Member

    Joined:
    Sep 25, 2019
    Messages:
    45
    Likes Received:
    0
    Code (Text):
    1. if "%loop-entity%" is "spawn_egg":
     
  13. chimchambi

    chimchambi Member

    Joined:
    Dec 4, 2019
    Messages:
    30
    Likes Received:
    0
    I am not trying to get if there is item on the ground. I am trying to check what kind of item there is on the ground
    --- Double Post Merged, Jan 26, 2020, Original Post Date: Jan 26, 2020 ---
    doesn't work. "loop-entity" is a dropped item, and because of that i can't check if the item is a hopper or something else...

    man its frustrating...
     
  14. PanHack

    PanHack Active Member

    Joined:
    Dec 18, 2019
    Messages:
    143
    Likes Received:
    8
    what exactly item you want to check
     
  15. chimchambi

    chimchambi Member

    Joined:
    Dec 4, 2019
    Messages:
    30
    Likes Received:
    0
    well... i found out how:

    command /test:
    trigger:
    loop all dropped items in radius 30 around location of player:

    if "%item of entity loop-entity%" is "cactus":
    broadcast "cactus is on the ground"
     
  16. PanHack

    PanHack Active Member

    Joined:
    Dec 18, 2019
    Messages:
    143
    Likes Received:
    8
    see you made it your self :emoji_grinning:
     
  17. chimchambi

    chimchambi Member

    Joined:
    Dec 4, 2019
    Messages:
    30
    Likes Received:
    0
    well i couldn't have done it without you guys :emoji_grinning: thx <3
     
Thread Status:
Not open for further replies.

Share This Page

Loading...