Skip to content

WeightTriggerComponent

Alex Crimi edited this page Mar 23, 2021 · 1 revision

WeightTriggerComponent works in conjunction with TriggerComponent. When the weight of all overlapping entities passes a certain threshold, the entity's TriggerComponent will be automatically activated. If the total weight falls back beneath the threshold, the TriggerComponent will be deactivated.

Configuration

When used inside the components block, the initial state of the component can be configured with the following parameters:

Key Type Description
threshold float The total weight needed to activate the entity's TriggerComponent

Example:

"WeightTriggerComponent": {
  "threshold": 30
}

Properties

The following properties are readable by property accessors (eg render state and persistence definitions):

Key Type Description
currentLoad float The current measured weight of all overlapping entities

Entity Templates

Overview
Components
Events
Update Scope
Filtering
Persistence
Variables
Value Resolution

Component Reference
Action Reference

Distribution

Creating An Executable

Releasing to Stores

Clone this wiki locally