Page 1 of 1
Unit corpse from unit model
Posted: 27 Dec 2009, 02:39
by Regret
Upon unit death a feature would be created using the unit model with custom defined texture and positioned accordingly with a script. Also 'dying' animation.
Re: Unit corpse from unit model
Posted: 27 Dec 2009, 02:54
by Pressure Line
death anims are possible afaik, just not used (although i think Argh did some collapsing high-rise buildings in world builder)
Re: Unit corpse from unit model
Posted: 27 Dec 2009, 04:29
by Argh
I have all sorts of death animations atm, and in WB, I do Unit-Unit swaps at death with Lua.
It's really straightforward- code the death animation in Killed(), and it will run until it reaches the return.
Re: Unit corpse from unit model
Posted: 27 Dec 2009, 08:49
by yuritch
PL: look at S44 ships for death animations, most should have them.
And +1 to corpse model 'inheriting' piece positions/rotation from the unit at Killed() return.
Re: Unit corpse from unit model
Posted: 27 Dec 2009, 20:46
by Tribulex
i have maek lots of shitcolor textures to be place over alive unit body in anticipationof this feature,
Re: Unit corpse from unit model
Posted: 27 Dec 2009, 22:03
by smoth
yuritch wrote:And +1 to corpse model 'inheriting' piece positions/rotation from the unit at Killed() return.
+1
Re: Unit corpse from unit model
Posted: 27 Dec 2009, 22:53
by Argh
That should be possible. Record the current Piece rotation states via Lua, and pass them as arguments during Create() for the death-variant's script.
I assume that there would be the usual problem of left-handed vs. right-handed coordinates, and translation, as opposed to rotation, probably won't work right (there seems to be an issue with getting the exact world-position of a Unit Piece, if anybody knows how to get that done, please let me know, that has other uses).
Re: Unit corpse from unit model
Posted: 28 Dec 2009, 15:29
by FireStorm_
First off, 'm a noob.
Having said that, to me it seems an unnecessary restriction that the 'corpse=' line in a fbi file, can only refer to a Feautue (as far as i know/tried.)
If a Unit could be manifested after a units death, instead of a Feature, this would open up a world of possibilities for wreckages and/or corpses.
Or am I way off and/or proposing something very hard to realise or perhaps even quite unachievable atm?
Re: Unit corpse from unit model
Posted: 28 Dec 2009, 15:40
by imbaczek
it's not hard, in fact, it's possible now - and it's a niche feature, so the engine itself will probably never do it. use synced lua for that.
Re: Unit corpse from unit model
Posted: 20 Feb 2010, 16:45
by bobthedinosaur
I was wondering if any one has tested the angle and movement passing on from unit to corpse? Or if any one has some examples/ ideas on how to modify the corpse model?