ResetWorldItem
Gives the level its own loose item back, in its place, on every client.
The slot’s record goes and every player’s game shows the level’s item where it lay again - on the table, the rack, the
shelf - including a player who took it (their own copy stays theirs). A pickup that stood in for it (RespawnWorldItem) is
taken away. This is what the restock period does by itself; a mode calls it to reset a house after a robbery, a stall at the
day’s start, a whole town between rounds. false for a slot that holds its item.
Syntax
Section titled “Syntax”ResetWorldItem(key)| Parameter | Type | |
|---|---|---|
key |
string | the item slot’s level name |
Returns
Section titled “Returns”boolean
Example
Section titled “Example”-- the merchant's table is laid again at dawnfor _, slot in ipairs(GetWorldItemsNear(STALL_X, STALL_Y, STALL_Z, 4)) do if slot.taken then ResetWorldItem(slot.key) endendSee also
Section titled “See also”ResetWorldItems · GetWorldItemsNear · OnPlayerTakeWorldItem · the Doors and containers group of the index
