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

When Pick Up Item

When Pick Up Item

Overview

Triggers whenever the player picks up an item. Good for pickup feedback, pickup counters, or pickup-driven 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 picked up

Typical Uses

  • Play a sound or shout when picking up
  • Count how many items were picked up
  • Inspect/alter inventory right after a pickup

Notes

  • Fires for any item; if you need to tell items apart, combine the item id / item name value blocks with an if block
  • Fires after the item has entered the inventory

Example

when pick up item
├── play sound "pickup"
├── change pickupCount by 1
└── talk "Picked up item x" + pickupCount

Generated Code

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

Block ID: cu_when_pickup


中文 | Event Blocks | Block Reference

Clone this wiki locally