Sorry, but I have several questions again
1. How do I get the thickness of armor? I tried:
var ptr RuleArmor armorRuleset;
var int newArmor;
unit.getRuleArmor armorRuleset;
armorRuleset.getArmor 0 newArmor;
As far as I undestand, I have to specify the side, with 0 being the frontal armor. I also tried switching 0 and "newArmor" places, since I'm not sure about the order of the arguments, but it didn't work either.
2. How can I "truly" kill a unit the moment it is spawned? I mean, I can use "unit.setHealth 0;" in "createUnit", but the unit is spawned in alive state, and dies only when it is hit (even for 0 damage) or after the end of turn. Is there a way to kill it right off? I need it because I have a "createUnit" script that subtracts hitpoints depending on different conditions and in some cases I want a unit to be spawned dead.
3. Can I make a "createUnit" script affect only the units that are spawned during the combat, but not the "default" units that are supposed to be "prespawned" before the combat is started? I tried checking for "turn" variable, but these units are considered to be spawned during the turn 1. And this turn also covers the first player's turn as well as the first aliens' turn. And I need these turns to be treated as "during the combat" already. Could you think of a condition that would exclude these "prespawned" units?