User Tools

Site Tools


heal_entity

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
heal_entity [2017/07/03 12:44] – created justinheal_entity [2021/04/21 18:31] (current) justin
Line 2: Line 2:
 ---- ----
  
-Deals the specified amount of damage to an entity. The entity is killed/destroyed if its health is reduced to zero.+Restores the specified amount of health to an [[entity]] (while not exceeding its maximum health value)
  
 +<WRAP center round info 100%>
 +As healing will have no effect on defeated [[character|characters]], you must use [[Revive Character]] in order to bring a defeated [[character]] back to life.
 +</WRAP>
 +
 +====Signature:====
 <code python> <code python>
-damage_entity(entity, damage_amount)+heal_entity(entity, heal_amount)
 </code> </code>
  
 ^Argument^Description^Type^Required^ ^Argument^Description^Type^Required^
-|entity|Entity that will be damaged.|[[Entity]]|Yes| +|entity|[[Entity]] that will be healed.|[[Entity]]|Yes| 
-|damage_amount|Amount of damage to deal.|[[Decimal]]|Yes| +|heal_amount|Amount of health to restore.|[[Number]]|Yes|
- +
-<WRAP center round info 100%> +
-You can use the related [[Heal Entity]] function to restore health to an entity that has been previously damaged. +
-</WRAP>+
  
 ====Example:==== ====Example:====
-<code python+<code bauxite
-damage_entity(player, 2)+heal_entity(player, 5);
 </code> </code>
-//Results:// The player'health is reduced by 2+//Results:// Five health points are restored to the player.
  
 <WRAP center round tip 100%> <WRAP center round tip 100%>
-Use the **Damage Entity** function to inflict damage upon the player character as they step onto hazardous tiles or open trapped chests.+Use the **Heal Entity** function to restore health to the player when a potion is used or when the player steps into a pool of water with healing capabilities.
 </WRAP> </WRAP>
  
Line 31: Line 32:
 <WRAP half column> <WRAP half column>
 ====Editor Node:==== ====Editor Node:====
-{{:wiki:damage_entity_node.png?nolink|}}+{{:wiki:heal_entity_node.png?nolink|}}
 </WRAP> </WRAP>
  
 <WRAP half column> <WRAP half column>
 ====Visual Demo:==== ====Visual Demo:====
-{{:wiki:damage_entity_demo.gif?nolink|}}+{{:wiki:heal_entity_demo.gif?nolink|}}
 </WRAP> </WRAP>
 </WRAP> </WRAP>
heal_entity.1499111078.txt.gz · Last modified: 2017/07/03 12:44 by justin