defineResource
defineResource(
name,settings):ResourceKey
Defines a resource once, at module scope, in a module the room and
every page import, and returns its key: mana, rage, stamina, a shield,
or a hidden count such as a combo. Only maximum is required: left
out, it starts full, never regenerates and is labelled with its name as
words, "Lantern charges" for "lanternCharges". The name is
camelCase, and the dump and a room’s stream write the resource under
it, so a name another trait dumps under throws, as does "health", the
engine’s. Defining a name again replaces its settings, as a reload of
its module does. As Unreal’s ability system defines an attribute.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name |
string |
settings |
ResourceSettings |