User Tools

Site Tools


damage_entity

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
damage_entity [2018/03/16 09:44] justindamage_entity [2021/04/21 18:58] (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.+Deals the specified amount of damage to an [[entity]]. The [[entity]] is killed/destroyed if its health is reduced to zero.
  
 ====Signature:==== ====Signature:====
Line 10: Line 10:
  
 ^Argument^Description^Type^Required^ ^Argument^Description^Type^Required^
-|entity|Entity that will be damaged.|[[Entity]]|Yes| +|entity|[[Entity]] that will be damaged.|[[Entity]]|Yes| 
-|damage_amount|Amount of damage to deal.|[[Decimal]]|Yes|+|damage_amount|Amount of damage to deal.|[[Number]]|Yes|
  
 <WRAP center round info 100%> <WRAP center round info 100%>
-You can use the related [[Heal Entity]] function to restore health to an entity that has been previously damaged.+You can use the related [[Heal Entity]] function to restore health to an [[entity]] that has been previously damaged.
 </WRAP> </WRAP>
  
 ====Example:==== ====Example:====
-<code python+<code bauxite
-damage_entity(player, 2)+damage_entity(player, 2);
 </code> </code>
 //Results:// The player's health is reduced by 2.  //Results:// The player's health is reduced by 2. 
  
 <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 **Damage Entity** function to inflict damage upon [[character|characters]] as they step onto hazardous [[tile|tiles]] or open trapped chests.
 </WRAP> </WRAP>
  
damage_entity.1521218664.txt.gz · Last modified: 2018/03/16 09:44 by justin