Manage Health, Damage, and Defeat

Health, or Hit Points, determines how much damage a character or enemy can sustain before it is defeated. Damage is the number that is subtracted from the health when the character or object collides with an enemy. After its health is depleted (reaches 0), the object or character is defeated and should be removed from the game.

Adding Health

To add health to an asset:

  1. On the Mind Map, double-click the World node where you want to add health to an asset.
  2. Inside the World, in the Asset panel on the left, double-click the asset to open its Node Map
  3. In the Node panel of the Node Map workspace, click Actions to expand the list.
  4. Drag the Health node to the Node Map grid.
    The Health node does not need to connect to the Start node.
  5. Click the Health node and in the Options panel on the right, in the Health field, enter the number of hit points for the asset. For details, see Health Node.

Now you need to specify the amount of damage to be applied to the character.

Defining Damage

To apply damage to an asset when it collides with an enemy:

  1. In the Node panel, search for the If Collide node and drag it to the Node Map.
  2. On the Start node, click the Created output and drag a connector to the Enabled input of the If Collide node.
  3. Click the If Collide node and in the Options panel on the right, in the Affected Assets drop-down list, select Enemy.
  4. In the Node panel, search for Damage, and drag it to the Node Map.
  5. On the If Collide node, click the Collide output and drag a connecter to the Enabled input of the Damage node.
  6. To change the damage amount, click the Damage node, and in the Options panel on the right, enter a numeric value to specify the Damage amount to be applied. For more details, see Damage Node.

Now you need to specify what happens when the character’s health is depleted.

Handling Defeat

To make a character or object defeated after its health reaches 0:

  1. In the Node panel, click Actions category, scroll to the Defeat node and drag it to the Node Map.
  2. On the Health node, click the Defeat output and drag a connector to the Enabled input of the Defeat node.

You’ve defined the amount of health our asset can have and the amount of damage it can sustain. Once defeated, it will be removed from the game.