Skip to content
mouse114514 edited this page Sep 12, 2026 · 1 revision

When Drop Item

When Drop Item

Overview

Triggers whenever the player drops an item. Good for drop feedback, drop counters, or drop handling logic.

This is a hat block: it must be placed at the top of a script.

Slots

This block has no parameter slots.

Connections

Connection Type Description
Top - hat block, cannot connect
Bottom Statement connected blocks run when an item is dropped

Typical Uses

  • Play a sound or shout when dropping
  • Count how many items were dropped
  • Warn or react before dropping high-risk items

Notes

  • Fires for any item; combine item id with an if block to tell items apart
  • Fires after the item has left the inventory

Example

when drop item
├── play sound "drop"
├── change dropCount by 1
└── talk "Dropped an item"

Generated Code

Emits the patch marker //PATCH:DropItem, injected into the DropItem() method.

Block ID: cu_when_drop


中文 | Event Blocks | Block Reference

Clone this wiki locally