Solved Cancel event for Zombie picking up dropped items

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

    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!

Omanoctoa

Member
Feb 4, 2025
36
3
8
Hello!
This one has been stumping me for 2 days...
I need to make a zombie with a specific name NOT able to pick up items. This works no problem for players, but for Zombies and other entities it does nothing.

Code:
on entity pickup:
  event-entity is a zombie #   Also tried...    entity is a zombie
  send "A Zombie is picking up a %event-item%" to all players
  display name of zombie contains "&c &c &c"
  cancel event

If I put "entity is a zombie" this does nothing.
If I put "event-entity is a zombie" I get an error: There are multiple entities in a pick up event. You must define which entity to use.

This is the simplest part of the script, and it doesn't work.
 
Hello!
This one has been stumping me for 2 days...
I need to make a zombie with a specific name NOT able to pick up items. This works no problem for players, but for Zombies and other entities it does nothing.

Code:
on entity pickup:
  event-entity is a zombie #   Also tried...    entity is a zombie
  send "A Zombie is picking up a %event-item%" to all players
  display name of zombie contains "&c &c &c"
  cancel event

If I put "entity is a zombie" this does nothing.
If I put "event-entity is a zombie" I get an error: There are multiple entities in a pick up event. You must define which entity to use.

This is the simplest part of the script, and it doesn't work.
Did some digging. The solution seems a little counterintuitive (Since event-entity doesn't work with on entity pickup). Check out the solution found in a similar thread here. You have to use event-creature I believe.
 
Did some digging. The solution seems a little counterintuitive (Since event-entity doesn't work with on entity pickup). Check out the solution found in a similar thread here. You have to use event-creature I believe.
Thanks for getting back to me! I lost track of this one for a bit, but I'm revisiting it shortly.

I wasn't aware of %event-creature%, will this work for any mob or just passive creatures? The Docs are quite limited with thorough examples and full syntax details...