This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
4rpl:commands:damageunit [2021/01/08 16:01] – external edit 127.0.0.1 | 4rpl:commands:damageunit [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
~~NOTOC~~ | ~~NOTOC~~ | ||
- | < | + | < |
+ | <= [[4rpl: | ||
====== DamageUnit ====== | ====== DamageUnit ====== | ||
Line 9: | Line 11: | ||
Typical health values for most units are either 0 or 1. Units that have a health of 0 will be destroyed when Damage is called. | Typical health values for most units are either 0 or 1. Units that have a health of 0 will be destroyed when Damage is called. | ||
Other units will have damage deducted from their health. Note that positive values cause damage. If a negative value is passed in, the resulting unit's health increases. | Other units will have damage deducted from their health. Note that positive values cause damage. If a negative value is passed in, the resulting unit's health increases. | ||
+ | |||
+ | :NOTE: Interestingly enough, when this API is used on a unit that is constructing, | ||
+ | |||
+ | :WARNING: If using this API for something like a custom missile and applying this API after getting a list of units to damage, __make sure the unit that's doing this __**< | ||
+ | -Vertu | Who temporarily lost his mind to this. | ||
===== Examples ===== | ===== Examples ===== | ||
<code 4rpl> | <code 4rpl> |