heal
Details
Kode wheel segment | Combat |
Style | Number variable |
Modifiers | None |
Primarily WHEN/DO | DO |
Pre-made brains that use it | Unknown |
Combat > heal
Description
This tile is the opposite of the damage tile. It will restore health points to self or others. Specify the target of the healing.
Example Code
WHEN [detect][allies][objects in front][nearest object]
…WHEN [Y][pressed] DO [heal][it][20]
Modifiers
None
Other Uses
You could use heal instead of revive in a respawning mechanism. This is particularly useful if you only wanted to restore partial health rather than restore maximum health (which revive does), or you didnt want to play the death visual effects. You could also change the heal amount as part of a levelling system. For example: at Level 1 he restores 50% of health, at level 2 he restores all health. You would need to turn destroy after death off and make the character immortal (as you cannot heal if the character is dead). Requires the Fall down emote or custom made kinect equivalent.
WHEN [once] DO [numvar:heal amount][=][max health][divided by][2]
WHEN [numvar:level][=][2] DO [numvar:heal amount][=][max health]
WHEN [started to][health][=<][1] DO [boolvar:dying][=][true]
WHEN [boolvar:dying]
…WHEN DO [emote][fall down]
…WHEN [countdown timer][3]DO [heal][numvar:heal amount]
…/…WHEN DO [boolvar:dying][=][false]