User Tools

Site Tools


remove_currency

Remove Currency


Removes the specified amount of a currency from a character.

Signature:

remove_currency(amount, stat_id, character)
ArgumentDescriptionTypeRequired
amountAmount of currency to remove.NumberYes
stat_idDefaults to “currency”.StringNo
characterDefaults to main player character.EntityNo

Example:

remove_currency(100, "currency", player);

Results: Decreases the player's base currency by 100 (i.e. their “currency” stat).

Use the Remove Currency function to take some gold coins from the player upon buying an item from an NPC or as a penalty for failing a quest.


Editor Node:

remove_currency.txt · Last modified: 2024/04/05 09:33 by justin