Skip to main content

(190) _SUB_ITEM

Effect

Remove an Item from the player's bag.

Syntax

_SUB_ITEM(item, amount, result)
ArgumentDescriptionTypesRequired
itemThe ID of the item to removeWork, FloatRequired
amountthe amountWork, FloatRequired
resultThe work to put the result intoWorkRequired
info

The result parameter is always 1 no matter what.

Example

ev_dummy:
_LDVAL(@SCWK_TEMP0, 7); Dive Ball
_LDVAL(@SCWK_TEMP1, 1); Amount
_SUB_ITEM(@SCWK_TEMP0, @SCWK_TEMP1, @SCWK_ANSWER)

The above script will take away 1 Dive Ball from the player's bag.