The best would be to combine all 3 anims in one, but well, let's go with scripting
I have not tested this myself, and although I've acquired a certain experience with this animation scripting, I'm guessing it may not work due to the fact you can't play several anims under one animation state.
First off, you should be referring to all of them in one AnimationState, DYING.
AnimationState = DYING
Animation = Part1
AnimationName = WUDrogoth_SKL.WUDrogoth_DIEA
AnimationMode = ONCE
End
Animation = Part2
AnimationName = WUDrogoth_SKL.WUDrogoth_DIEB
AnimationMode = ONCE
End
Animation = Part3
AnimationName = WUDrogoth_SKL.WUDrogoth_DIEC
AnimationMode = ONCE
AnimationBlendTime = 4
End
End
Referring to multiple animation states will result in some not being used, or worse, game.dat
Now, by using the same Animation State for all, what you do is randomize between the anims, which still isn't the point; this is where the scripting kicks in.
Notice that I've named each anim in the line "Animation =" and cut it down into Part 1, 2 and 3. What we'll do is that we'll script it so it goes to through the 3 anims one by one.
First off, as I said before, it will randomise through the anims if you don't pick one up straight away. So we call for Part1.
BeginScript
return "Part1"
And that's where I'm afraid the code will stop parsing the scripting. But it's worth trying
then you simply play the other two, but do add a continuity, so it plays 2 after 1, and 3 after 2.
BeginScript
if PrevAnim == "Part2"
then
return "Part3"
else
if PrevAnim == "Part1"
return "Part2"
else
return "Part1"
end
end
EndScript
Hopefully that was clear enough
final code :
AnimationState = DYING
Animation = Part1
AnimationName = WUDrogoth_SKL.WUDrogoth_DIEA
AnimationMode = ONCE
End
Animation = Part2
AnimationName = WUDrogoth_SKL.WUDrogoth_DIEB
AnimationMode = ONCE
End
Animation = Part3
AnimationName = WUDrogoth_SKL.WUDrogoth_DIEC
AnimationMode = ONCE
AnimationBlendTime = 4
End
End
BeginScript
if PrevAnim == "Part2"
then
return "Part3"
else
if PrevAnim == "Part1"
return "Part2"
else
return "Part1"
end
end
EndScript
Edited by ched, 13 March 2006 - 06:10 PM.