crystal.const.set
Sets the value of a constant.
This function does nothing in fused builds.
Usage
crystal.const.set(name, value)
Arguments
| Name | Type | Description |
|---|---|---|
name | string | Name of the constant. |
value | any | New value for the constant. The type of this argument must match the type of the constant. |
Examples
crystal.const.define("EnemyHP", 100, { min = 1, max = 1000 });
crystal.const.set("EnemyHP", 80);