the workaround is pretty easy but i decided to post it nonetheless. you can do really cool things with it, especially in combination with ze-animation, e.g. landing ships with deploying landinggear.
what you do is making an object with a deathanimation that you kill through lua to trigger the animation.
what you need first is a working animationset for the object. you need two animations:
-the idle animation, with the object in the pose before the triggered animation. e.g. the ship flying
-the death animation, the animation that you want to trigger. e.g. the ship with the ladinggear deploying
in the msh.file should have the object in the pose after the triggered animation. e.g. the ship with the landinggear deployed.
here is an example odf for the object:
Code: Select all
[GameObjectClass]
ClassLabel = "animatedbuilding"
GeometryName = "ship.msh"
[Properties]
GeometryName = "ship"
DestroyedGeometryName = "ship"
MaxHealth = "1000" //the value doesnt matter
AnimationName = "ship" //the name of the animset
IdleAnimation = "flying" //the first animation
DeathAnimation = "landing" //animation that will be triggered
AINoRepair = "1" //necessary, if the ai is able to reach it
HideHealthBar = "1" //these two values prevent the player from
IsNotTargetableByPlayer = "1" //recognizing this as an destroyable object
FoleyFXGroup = "metal_foley"
Code: Select all
--ship setup--
SetProperty("ship", "MaxHealth", 1e+37) --give the object an infinite healthlimit
SetProperty("ship", "CurHealth", 1e+37) --and unlimited health
SetAIDamageThreshold("ship", 0.0) --preventing the ai from damaging it, just to be sure
Code: Select all
OnWhatever(
function(something)
SetProperty("ship", "CurHealth", "0") --trigger the animation
end,
somename
)
i hope this will be helpfull to somebody sometime..



