Hrmm, my current project is trying to make a decent ferret... which will include learning how to do animations.... I may start off first by just trying to make such an alternate spawn animation for skeletons.
What inspired me to ask actually was watching the last episode of GoT, where Bran and company finally get to the tree and all those skeletons start popping out of the ground, ready to go at it.
If I can do it, it would be nice to adapt it to zombies too, for popping out of graves....
Dammit... another squirrel. My module will never be finished. Ever.
Manny, in the Q a_ba series there is a "climb from pit" animation in the Custom6 slot that might meet your needs.
EDIT - Tested with the following code. Monster climbs from ground and then attacks - does not cancel animation to do so. I used the PostSpawn Event which requires that the creature use the XP2 Monster Events and has the variable "X2_USERDEFINED_ONSPAWN_EVENTS" set to 2. Below is the code that replaces the UserDefined Event. I haven't fine tuned the timing of the action queue, but its pretty close as is. When you spawn the creature have it rotated so that its back is facing the PC, as the creature rotates 180 degrees at the start of the animation.
//::///////////////////////////////////////////////
//:: Name x2_def_userdef
//:: Copyright © 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Default On User Defined Event script
*/
//:://////////////////////////////////////////////
//:: Created By: Keith Warner
//:: Created On: June 11/03
//:://////////////////////////////////////////////
const int EVENT_USER_DEFINED_PRESPAWN = 1510;
const int EVENT_USER_DEFINED_POSTSPAWN = 1511;
void main()
{
int nUser = GetUserDefinedEventNumber();
if (nUser == EVENT_USER_DEFINED_POSTSPAWN)
{
ClearAllActions();
ActionPlayAnimation(ANIMATION_LOOPING_CUSTOM6,2.0,13.0);
DelayCommand(0.2, ActionDoCommand(SetCommandable(TRUE)));
DelayCommand(12.8, SetCommandable(FALSE));
}
}