User Tools

Site Tools


4rpl:commands:applytodamagemap

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
4rpl:commands:applytodamagemap [2025/02/14 14:57] – external edit 127.0.0.14rpl:commands:applytodamagemap [2025/08/23 17:51] (current) – old revision restored (2024/02/18 20:07) virgilw
Line 29: Line 29:
 <code 4rpl> <code 4rpl>
 ApplyToDamageMap(self <-targetX <-targetZ 10 5000000 false) ApplyToDamageMap(self <-targetX <-targetZ 10 5000000 false)
 +
 +#Since the damage was associated with a unit, no need to remove it.
 +#If you need to remove all damage associated with a unit prior to 
 +#the destruction of the unit, call RemoveUnitDamageMap.
 +</code>
 +
 +<code 4rpl>
 +ApplyToDamageMap(-1 <-targetX <-targetZ 10 5000000 false)
  
 :Destroyed :Destroyed
-   #Remove the damage when this unit is destroyed +   #Remove the damage. Since damage was applied but not associated with a unit, it must be manually removed 
-   ApplyToDamageMap(self <-targetX <-targetZ 10 -5000000 false)+   ApplyToDamageMap(-1 <-targetX <-targetZ 10 -5000000 false)
 </code> </code>
 +
 <code 4rpl> <code 4rpl>
 ApplyToDamageMap(self <-targetX <-targetZ 10 <-DAMAGE 1000000 * false) ApplyToDamageMap(self <-targetX <-targetZ 10 <-DAMAGE 1000000 * false)
 #Using a DAMAGE Initial Variable, we multiply it by 1,000,000 to keep it scaled to real values of Creeper depth. #Using a DAMAGE Initial Variable, we multiply it by 1,000,000 to keep it scaled to real values of Creeper depth.
  
-:Destroyed 
-   #Remove the damage when this unit is destroyed 
-   ApplyToDamageMap(self <-targetX <-targetZ 10 <-DAMAGE -1000000 * false) 
 </code> </code>
  
4rpl/commands/applytodamagemap.txt · Last modified: 2025/08/23 17:51 by virgilw