Pages: [1]
  Print  
Author Topic: torso running animation code help  (Read 4498 times)
fromhell
Administrator
GET A LIFE!
**********

Cakes 34
Posts: 14512



WWW
« on: May 05, 2012, 07:09:06 am »

Hi

i've made a player model with a new TORSO_RUN animation placed after all the missionpack gestures. Problem is I can't seem to override TORSO_STAND no matter how hard I try.

I want to play it synced with legs and only when I run forward.

I attached my broken attepmt at implementing it

i also attached a sarge animation.cfg with a few more animation tokens to debug with (no actual animations are made for him)
Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
andrewj
Member


Cakes 24
Posts: 581



« Reply #1 on: May 05, 2012, 09:16:46 pm »

I took a look but couldn't see why, after switching to the gauntlet, the TORSO_RUN2 animation was not being used.
Logged
fromhell
Administrator
GET A LIFE!
**********

Cakes 34
Posts: 14512



WWW
« Reply #2 on: May 05, 2012, 09:29:39 pm »

eventually i'll add more torso animations if ths is successful. want to do torso_jump and torso_land also for both jumping animations too

i'm on a mission to 'de-stiff' the animation Smiley

cgame already has complatibility measures for player models that lack the new animations I want to do so there shouldn't be problems
Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
revanic
VIP
Half-Nub


Cakes 4
Posts: 67


« Reply #3 on: May 06, 2012, 11:31:03 am »

I suggest checking the legs animation to see if its in a running animation instead of using xyspeed. Also I must warn you that after firing, the animation will become desynched. Elite Force singleplayer suffered from it, but you rarely saw yourself moving like that. You'll have to find a way to keep the frames synched which will be much easier with a BOTH_RUN animation rather than a seperate LEGS_RUN and TORSO_RUN.
« Last Edit: May 06, 2012, 11:43:23 am by revanic » Logged
fromhell
Administrator
GET A LIFE!
**********

Cakes 34
Posts: 14512



WWW
« Reply #4 on: May 12, 2012, 05:01:00 am »

I just realized i am supposed to compile both cgame and game when I make a change......



so now here's my torso animation function so far

Code:
static void PM_TorsoAnimation( void ) {
if ( pm->ps->weaponstate == WEAPON_READY ) {




// Falling Downward
if ( pm->ps->velocity[2] < -10 ){
if ( pm->ps->weapon == WP_GAUNTLET ) PM_RunningTorsoAnim( TORSO_FALL2 );
else PM_RunningTorsoAnim( TORSO_FALL );
}
// Falling Upward
else if ( pm->ps->velocity[2] > 10 ){
if ( pm->ps->weapon == WP_GAUNTLET ) PM_RunningTorsoAnim( TORSO_JUMP2 );
else PM_RunningTorsoAnim( TORSO_JUMP );
}

// Running Forward
//if (  pm->ps->legsAnim && LEGS_RUN ) {
else if (  pm->cmd.forwardmove || pm->cmd.rightmove  ) {
if ( pm->ps->weapon == WP_GAUNTLET ) PM_RunningTorsoAnim( TORSO_RUN2 );
else PM_RunningTorsoAnim( TORSO_RUN );
}
else

{
if ( pm->ps->weapon == WP_GAUNTLET ) {
PM_ContinueTorsoAnim( TORSO_STAND2 );
} else {
PM_ContinueTorsoAnim( TORSO_STAND );
}
}
return;
}

}
You see where i'm going with this right? Tongue
Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
andrewj
Member


Cakes 24
Posts: 581



« Reply #5 on: May 12, 2012, 09:16:29 am »

it boggles my mind Smiley

riding up or down lifts should be interesting....
Logged
fromhell
Administrator
GET A LIFE!
**********

Cakes 34
Posts: 14512



WWW
« Reply #6 on: May 12, 2012, 07:43:34 pm »

yeah i haven't made an onground check for that yet. it's already strange when you go up and down slopes

'm just eager and excited to put in more animation. HOPEFULLY the compatibility is still retained with untouched cgames, maybe i'll do a function check to stay safe (i.e. if cgame returns a value for "extendedanimation" then call the new animations if not then just stick to the usual torso_stand)

I already have all my new animations fall back to torso_stand if the token doesn't exist for it in animation.cfg.
Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
Pages: [1]
  Print  
 
Jump to: