This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
4rpl:commands:applytodamagemap [2022/04/23 14:01] – virgilw | 4rpl:commands:applytodamagemap [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 25: | Line 25: | ||
:!: 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]] | :!: 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(< | ||
+ | </ | ||
+ | |||
< | < | ||