Health Brainbox
This Brainbox adds health to an asset, making it damaged when it collides with other assets. If the asset is defeated, this brainbox ends the game.
After this asset collides with another object, it subtracts 1 point from the health amount, and the damage is indicated by a white flash on its surface. After the health reaches 0, a game over event is triggered which pauses the game world. For details on creating a Game Over screen see UI Nodes.
Brainbox Attributes
After you add this Brainbox to an asset, you need to specify which asset will cause damage by changing the Affected Asset attribute.
Attribute | Description |
Health | Enter the amount of times you want this asset to take damage before it becomes defeated. |
Delay | Enter the amount of seconds you want to wait after the asset is defeated before the game over event is triggered. |
Affected Asset | Select which asset or type of asset you want to cause damage. |
Nodes in Brainbox group
After you add this Brainbox to an asset, a Collision (If Collide) node, Custom Damage node, Defeat node, Delay Defeat Animation, and Event Observer node are added to the Node Map.