Greetings,
In fact, it's much easier to damage people than this.
You can use the setDammage command on a unit to injure it. For instance:
player setDammage 0.1
; Damages the player a little,
player setDammage 0.5
; Damages him 50%,
player setDammage 1
; kills him instantly.
If you want to continue damaging him, try something like this (no garantees):
#top
@unit distance fire < 3
_damage = getDammage unit
unit setDammage (_damage = _damage + 0.1)
~0.8
? player distance fire > 2: goto "top"
_damage = getDammage unit
unit setDammage (_damage = _damage + 0.1)
~0.8
? player distance fire > 2: goto "top"
_damage = getDammage unit
unit setDammage (_damage = _damage + 0.1)
~0.8
? player distance fire > 2: goto "top"
; and so on. This only works if there is some object at the
; position of the fire called "fire", and if the infantry unit is
; called "unit".
If you don't understand something above, just ask
-Supreme Commander PsyWarrior
-Psychic Productions