Resource

Power Type

Provides a variable with an assignable minimum and maximum value that can be used as a timer, or other things.

Type ID: origins:resource

Note

This power type provides a variable that can be changed with the Change Resource (Entity Action Type), and check the value of with the Resource (Entity Condition Type).

Fields

Field Type Default Description
min Integer The minimum value of the resource.
max Integer The maximum value of the resource.
hud_render Hud Render optional Determines how the resource is visualized on the HUD.
start_value Integer optional The value of the resource when the entity first receives the power. If not set, this will be set to the value of the min integer field.
min_action Entity Action Type optional If specified, this action will be executed on the entity whenever the minimum value is reached.
max_action Entity Action Type optional If specified, this action will be executed on the entity whenever the maximum value is reached.

Examples

{
    "type": "origins:resource",
    "min": 0,
    "max": 1,
    "hud_render": {
        "should_render": false
    },
    "min_action": {
        "type": "origins:heal",
        "amount": 6
    }
}

This example will provide a variable with a minimum value of 0 and a maximum value of 1, which can effectively serve as a boolean that can be changed with the Change Resource (Entity Action Type).