User Tools

Site Tools


revive_character

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.NumberYes

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.txt · Last modified: 2021/04/21 18:47 by justin