User Tools

Site Tools


revive_character

This is an old revision of the document!


Revive Character


Revives a defeated character, bringing them back to life with the specified amount of health.

Signature:

revive_character(character, heal_amount)
ArgumentDescriptionTypeRequired
characterCharacter that will be revived.EntityYes
heal_amountAmount of health to restore after being revived.DecimalYes

Example:

revive_character(player, player.stat["max_hp"] / 2)

Results: The player is brought back to life with half of their maximum health.

Use the Revive Character function in your “Player is Defeated” global event script to revive the player character and return them to a house or base.


Editor Node:

Visual Demo:

revive_character.1580873981.txt.gz · Last modified: 2020/02/04 19:39 by justin