Immunity
The Immunity Logic allows you to make any unit immune to any warhead. This tutorial will teach you how to use it.
| ImmunityTypes |
First off, you need to declare your ImmunityTypes in a list section:
;List ImmunityTypes here [ImmunityTypes] 0=Fire 1=Ice 2=Shock ;up to 200 should work flawlessly
Declaring ImmunityTypes in a list gives you the advantage of being able to use one ImmunityType on multiple warheads.
| Warheads |
Now it is time to set up your warheads. Examples:
[FireWH] (...) ImmunityType=Fire
[IceWH] (...) ImmunityType=Ice
[ShockWH] (...) ImmunityType=Shock
I believe this part of code explains itself.
| Units |
The last thing to do is to make units immune to your warheads. Example:
[TESTUNIT] (...) ImmuneTo=Ice VeteranImmuneTo=Ice,Fire EliteImmuneTo=Fire,Shock
The TESTUNIT unit will be immune to Ice when it's been freshly created.
When it gets veteran, it will be immune to both Fire and Ice.
When it gets elite, it will be immune to Fire and Shock, but not to ice anymore (see how Ice is not listed there).
And that's about it.
If your unit gets fired at with a warhead it is immune against, nothing will happen.
| Rock Patch Help CE | Main page | Last change: 01.12.06 |