This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
4rpl:commands:applytodamagemap [2021/04/01 20:19] – layout Karsten75 | 4rpl:commands:applytodamagemap [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 20: | Line 20: | ||
- | :!: The damage map is persistent (during a game and even across save/ | + | :!: The damage map is persistent (during a game and even across save/ |
- | a weapon projectile, your must remove that applied damage once the projectile no longer exists. To remove from the damage map, simply use a negative value for amt.\\ | + | a weapon projectile, your must remove that applied damage once the projectile no longer exists, if the projectile is not specified as the unit in the call to ApplyToDamageMap |
- | :!: BE VERY CAREFUL TO SUBTRACT OUT EXACTLY WHAT IS APPLIED TO THE DAMAGE MAP. OTHERWISE VALUES WILL BE LEFT IN THE DAMAGE MAP THAT WILL AFFECT MORTAR FIRE AND ANY OTHER UNIT THAT LOOKS AT THE DAMAGE MAP. | + | :!: BE VERY CAREFUL TO SUBTRACT OUT EXACTLY WHAT IS APPLIED TO THE DAMAGE MAP. OTHERWISE VALUES WILL BE LEFT IN THE DAMAGE MAP THAT WILL AFFECT MORTAR FIRE AND ANY OTHER UNIT THAT LOOKS AT THE DAMAGE MAP. See [[RemoveUnitDamageMap]] |
+ | :WARNING: When using this API, you can't just directly input your damage variable in. A single cell of Creeper with a depth of " | ||
===== Examples ===== | ===== Examples ===== | ||
<code 4rpl> | <code 4rpl> | ||
- | ApplyToDamageMap(-1 < | + | ApplyToDamageMap(self < |
:Destroyed | :Destroyed | ||
# | # | ||
- | | + | |
</ | </ | ||
+ | <code 4rpl> | ||
+ | ApplyToDamageMap(self < | ||
+ | #Using a DAMAGE Initial Variable, we multiply it by 1,000,000 to keep it scaled to real values of Creeper depth. | ||
+ | |||
+ | :Destroyed | ||
+ | # | ||
+ | | ||
+ | </ | ||
+ | |||
+ | ==== Presets ==== | ||
+ | <code 4rpl> | ||
+ | ApplyToDamageMap(< | ||
+ | </ | ||
+ | |||
< | < | ||