Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

animation timer

Page: 1 of 1
 Tinny
09-18-2004, 2:56 PM
#1
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-19-2004, 12:42 AM
#2
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, 1:49 PM
#3
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, 2:21 PM
#4
uh, what do you mean? Could you please explain what you're shooting for?
 Tinny
09-19-2004, 5:40 PM
#5
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, 5:43 PM
#6
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, 8:25 PM
#7
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, 8:50 PM
#8
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, 9:45 PM
#9
you're welcome.
Page: 1 of 1