PDA

View Full Version : animation timer


Tinny
09-18-2004, 01:56 PM
hey guys, i'm completely confused as to the function or difference between torsotimer and handextendtime in upperbody animations. what i have now is its playing an animation with handextendtime length, but if i try to cut it off by activating force sight or force absorb its not cutting off and its still playing the animation and only will stop when the handextend length time is up :/

razorace
09-18-2004, 11:42 PM
handextendtime is sort of like a sub-animation system. It's set up to handle all the animations that can't be used at that same time as other animations (other than the saber move animations).

TorsoTimer is the actual animation debounce timer. It's used by the animation system to keep track how long the current animation is supposed to last.

Tinny
09-19-2004, 12:49 PM
ah ok, thanks Razor. do you know if there's anyway to overwrite an anim by executing something else if the handextend time is say set to 5 seconds ? so the animation will run for 5 seconds unless the person activates force absorb or something.

razorace
09-19-2004, 01:21 PM
uh, what do you mean? Could you please explain what you're shooting for?

Tinny
09-19-2004, 04:40 PM
hmm, lets say i wanted someone to do a screaming animation(BOTH_SONIC_PAIN), now i set it the handextend, and i set the the handextend time (around 10 seconds). i try to write another line that says if the person activates force seeing, he can cut off the animation before the 10 seconds are up, like so:

if ( traceEnt->client || traceEnt->s.eType == ET_NPC )
{
if ( !((traceEnt->client->ps.fd.forcePowersActive & (1 << FP_SEE)) && (traceEnt->client->ps.fd.forcePowerLevel[FP_SEE] > FORCE_LEVEL_1)))
{
traceEnt->client->ps.forceHandExtend = HANDEXTEND_FORCE_BLINDED3;
traceEnt->client->ps.forceHandExtendTime = level.time + 10000;
}
if ((traceEnt->client->ps.forceHandExtend == HANDEXTEND_FORCE_BLINDED3) && ((traceEnt->client->ps.fd.forcePowersActive & (1 << FP_SEE)) && (traceEnt->client->ps.fd.forcePowerLevel[FP_SEE] > FORCE_LEVEL_1)))
{
//traceEnt->client->ps.forceHandExtend = HANDEXTEND_FORCE_BLINDED_STOP;
//traceEnt->client->ps.forceHandExtendTime = level.time + 200;
traceEnt->client->ps.legsAnim = BOTH_SONICPAIN_END;
traceEnt->client->ps.legsTimer = 350;
}
}

Tinny
09-19-2004, 04:43 PM
it won't let me edit my post, i'm posting a cleaner looking version of what i posted above:

if ( !((traceEnt->client->ps.fd.forcePowersActive & (1 << FP_SEE)) && (traceEnt->client->ps.fd.forcePowerLevel[FP_SEE] > FORCE_LEVEL_1)))
{
traceEnt->client->ps.forceHandExtend = HANDEXTEND_FORCE_BLINDED3;
traceEnt->client->ps.forceHandExtendTime = level.time + 10000;
}
if ((traceEnt->client->ps.forceHandExtend == HANDEXTEND_FORCE_BLINDED3) && ((traceEnt->client->ps.fd.forcePowersActive & (1 << FP_SEE)) && (traceEnt->client->ps.fd.forcePowerLevel[FP_SEE] > FORCE_LEVEL_1)))
{
traceEnt->client->ps.forceHandExtend = HANDEXTEND_FORCE_BLINDED_STOP;
traceEnt->client->ps.forceHandExtendTime = level.time + 200;
}

so what its saying is, play the scream animation for 10 seconds when the person has no force sight activated, when the person activates sight, change the animation to scream stop and run that for .2 seconds.

razorace
09-19-2004, 07:25 PM
So, what's the problem?

Remember that the handextend isn't a direct control of the animation system. Your traceEnt->client->ps.forceHandExtend is a proxy enum. You'll have to add a new enum and code in the actual handextend code area.

Tinny
09-20-2004, 07:50 PM
the problem was when i activated force sight it wouldn't overwrite the other animation, but now it works pretty well, thanks so much Razor.

razorace
09-20-2004, 08:45 PM
you're welcome.