SetPickupHealth
Sets the condition a pickup’s item has.
1..100: every screen makes the item lying there at that condition, and whoever takes it keeps it. Set it right after the
pickup is made (CreatePickup takes it as an argument too): a screen that shows the pickup already keeps the one it made.
A player’s drop has the dropped item’s condition already.
Syntax
Section titled “Syntax”SetPickupHealth(id, health)| Parameter | Type | |
|---|---|---|
id |
number | the pickup |
health |
number | the condition, 1..100 |
Returns
Section titled “Returns”boolean - false for an entity that is no item pickup
Example
Section titled “Example”local id = CreatePickup("shortswordBroad", x, y, z)SetPickupHealth(id, 40)See also
Section titled “See also”GetPickupHealth · CreatePickup · the Items and inventory group of the index
