19.02.2005, 22:25:59
I thought of the following:
You give a unit the tag AltDeathX=Y.
What do X and Y mean? Well:
X is the InfDeath that caused the death anim Y to work. How that works?
When a warhead kills an infantry, it checks what InfDeath is set to the warhead and plays the animation. I'd expand that:
Before it plays the animation, it checks for the AltDeathX= tag of the dying unit.
X would be the same number as assigned to the InfDeath= tag of the warhead, so if the warhead's InfDeath is 5, the game checks AltDeath5=
If its value is NOT the default value (e.g. -1), it takes the InfDeath number Y listed in the NewInfDeaths list or NewInfMutations list.
Example:
[NewInfMutations]
0=COWTOANY
[COW]
...
AltDeath8=0 ;if genetic mutation is fired at it, animation COWTOANY is played.
Because of the number X, it's easy to find out whether the anim is a mutation or not (0 to 7 isn't, 8 is, 9 isn't, 10 to 100 is, every higher number isn't).
You give a unit the tag AltDeathX=Y.
What do X and Y mean? Well:
X is the InfDeath that caused the death anim Y to work. How that works?
When a warhead kills an infantry, it checks what InfDeath is set to the warhead and plays the animation. I'd expand that:
Before it plays the animation, it checks for the AltDeathX= tag of the dying unit.
X would be the same number as assigned to the InfDeath= tag of the warhead, so if the warhead's InfDeath is 5, the game checks AltDeath5=
If its value is NOT the default value (e.g. -1), it takes the InfDeath number Y listed in the NewInfDeaths list or NewInfMutations list.
Example:
[NewInfMutations]
0=COWTOANY
[COW]
...
AltDeath8=0 ;if genetic mutation is fired at it, animation COWTOANY is played.
Because of the number X, it's easy to find out whether the anim is a mutation or not (0 to 7 isn't, 8 is, 9 isn't, 10 to 100 is, every higher number isn't).