We would very much like to be able to return which corpse file to use from the script.
Currently, the corpse file is referenced in the FBI, and can only be used in the sequence ("full corpse", "degraded corpse", "heap", etc).
We would like to have the killed() script return("my unit dead", 1); so that the unit would die with the corpse allocated, and then degrade according to what is specified in the corpse file.
We feel this would give far more options to modders, and would complement the death animation system far better, as currently we have to end the animation in a way that will comply with the corpse specified.
We would like to have multiple death animations, with each animation resulting in a different corpse.
For example, on the ATAT, we would like to make it fall over a couple of different ways after it is killed. However, because of the corpse limitation, we can only have it fall over in the way that reflects the single corpse option we have available.
Code: Select all
How it works now:
Corpse:
[Myunit_dead] -> [Myunit_heap] -> nothing
FBI:
corpse=Myunit_dead;
Script:
Killed(severity,corpsetype)
{
corpsetype = 1; // [Myunit_dead]
corpsetype = 2; // [Myunit_heap]
corpsetype = 3; // nothing
return(corpsetype); //engine spawns given corpse
}
How it should work:
Corpse:
As many sequences as you want, for example
[Myunit_dead] -> [Myunit_heap] -> nothing
[Myunit_dead2] - > [Myunit_heap2] -> [Myunit_heap2_2] -> nothing
FBI:
Depreciation of corpse tag
Script:
Killed(severity,corpsetype)
{
if(severity < 50) {
return("Myunit_dead",2); //use Myunit_dead sequence starting at Myunit_heap
}
if(severity >= 50) {
return("Myunit_dead2",1); //use Myunit_dead2 sequence starting at Myunit_dead2
}
}