User Tools

Site Tools


give_currency

Give Currency


Gives the specified amount of a currency to a character.

Signature:

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

Example:

give_currency(100, "currency", player);

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

Use the Give Currency function to reward the player with gold coins upon finishing an important task or completing a quest for an NPC.


Editor Node:

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