DestroyEntityAction - acrimi/Raven GitHub Wiki
DestroyEntityAction
destroys an entity upon execution. By default, the entity will be destroyed immediately, but the action can be configured to instead attempt to destroy the entity indirectly by setting the hp
property of its HealthComponent to 0
. If the entity has no HealthComponent, they will be destroyed immediately regardless.
Configuration
The following parameters can be used to configure the action's behavior:
Key | Type | Description |
---|---|---|
immediate | boolean | If true , the child entity will be immediately destroyed upon execution, otherwise the action will simply attempt to set its hp to 0 . Defaults to true . |
Example:
"eventName": {
"action": "DestroyEntityAction",
"immediate": false
}