Game Development Community

Help Playing an Animated sequence(s)

by Kimberly Unger · in Technical Issues · 09/15/2003 (3:24 pm) · 0 replies

We have made a weapon (based off of the Rifle.cs script)with a set of animation sequences and a single thread (#0). The sequences include an Emerge, Putaway, Fire, Hidden, and Idle. We've been able to get the Fire, Hidden and Idle to work but we are having problems with Emerge and Putaway. Is there any examples that will help us find out what we need to do? AA code snipit is shown bellow.


// Play the Emerge animation
stateName[2] = "Emerge";
stateTransitionOnTimeout[2] = "Ready";
stateTimeoutValue[2] = 0.1;
stateAllowImageChange[2] = true;
stateSequence[2] = "Emerge";
stateScript[2] = "onEmerge";

// Ready to fire, just waiting for the trigger
stateName[3] = "Ready";
stateTransitionOnNoAmmo[3] = "Activate";
//stateTransitionOnTriggerDown[3] = "Fire";
stateSequence[1] = "Idle";

//-----------------------------------------------------------------------------
function GunImage::onEmerge(%this)
{
echo(">>>>>GunImage::onEmerge");
%this.setActionThread("Emerge", true, true);
}