How to check if hit entity is an itemframe?

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

pepper82

Member
Jan 26, 2017
272
1
18
42
Hi all,
how would I check if the hit entity (on projectile hit) is an itemframe? Any way to do this?

And how do I set a block at a specific location to an itemframe?
 
Last edited:
You can do this using a different event.
code_language.skript:
on unhang: #Needs MundoSK
    if hanged entity is an item frame:
        message "success"
 
And without mundosk?
Also where does it check for projectile / arrow in your code?
 
I'm not here to spoonfeed you, I gave you how to check when the item frame gets taken down as a guideline.
That was awfully rude of you. He was simply asking how to detect something, he didn't ask to have a full blown code written.

Pepper I have tried to figure this out a few times, I will keep working on seeing if I can figure something out. Its stupid because an Item frame is an entity, yet for some reason when I check for an entity getting hit, its not registering.
 
  • Like
Reactions: pepper82
code_language.skript:
on damage of item frame:
    damage cause = projectile
    broadcast "%location of block at victim's location%"
    cancel event

:|
 
And how do I set a block at a specific location to an itemframe?

Just want to note that an item frame is not a block. You won't be "setting a block", you'll just be spawning it in like you would any other entity.
 
Status
Not open for further replies.