HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.
Pages: 1 2 [3] 4

Author Topic: importing  (Read 8745 times)

DPontious

  • General Accounts
  • *
  • Posts: 36
    • View Profile
Re: importing
« Reply #30 on: Dec 01, 15, 03:49:36 PM »

ok, cool yeah I was confused it gave me a .hgm file, but I see now. im taking it that once I manually place the walk.hgm. I will need to right its own .asq?
Logged

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: importing
« Reply #31 on: Dec 01, 15, 04:05:02 PM »

correct, you can copy the idle.asq and change the name to "walk.asq" and edit it to change the name inside too.
the name must be exactly the same as the animation.

Also you'll need to edit the Animation.dat file and add your new animation (walk) to the list, just beneath idle.

Animation.dat
Code: [Select]
!
!Basic AnimationSet.dat with a tempalte idle sequence listed
Version=1
[SEQUENCES]
  idle
  walk
  run
  walkrun


you'll need to change its properties, its read only.
also change properties of "yourcharacterName".aas to NOT read only, and edit it to add your new walk animation.

Here is a very basic implementation of ours for a simple character, but it contains animation references that you do not have, BUT you can either add them, or change the names to match animations that you create.


there may also be some variables that you don't have set up like Pose etc,

you can replace the contents of your "mycharacterName".aas with this:


YourCharcterName.aas

Code: [Select]
! biped control
!
!

channels
{
  AnimAllBody
  //WeaponRightHand
  //Impact
}


inputs
{
  BaseMode = Normal, Combat, Pose
  BasePosture = Idle, Turning, Moving, Dead, Alive
  variable IdleType = Normal, Dead, Ready
  MoveDirection = Forward, Backward
  TurnDirection = None, Right, Left
  TurnAmount = None, T45Degrees, T90Degrees, T135Degrees, T180Degrees
  variable MoveType = Normal, Swim
  variable AlreadyTurning =  True, False
  variable OverridePosture = None, Jumping, Falling, Landing, Dead
  variable CurrentMotion = CombatMove, Idle, TurningLeft, TurningRight, Forward, Backingup
// basic input modifiers
  variable PoseType = None, SnapShot
//combat
  variable Attacking = None, Sideslash, Swipe, Laser, SpellcastLeft
  variable ImpactHit = None, Blam
}

transition OverridePosture {
  from None to Jumping = DoJump
}

transition MoveType {
  from Normal to Swim = EnterSwim
  from Swim to Normal = LeaveSwim
}

transition BasePosture {   
  from Idle to Dead = trDie
  from Moving to Dead = trDie
 
  from Turning to Dead = trDie
  }
 

transition BaseMode {
  from Normal to Combat = trGetReady
  from Combat to Normal = trCalmDown
 
  from Normal to Pose = EnterPose
  from Combat to Pose = EnterPose
 
  from Pose to Normal = ReleasePose
  from Pose to Combat = ReleasePose
}

action ReleasePose
{
change PoseType to None
}

action EnterPose
{
force (1) AnimAllBody {
when PoseType {
Default:
                                anim "pose"
looping true
hold 0
align false
blend 0
change AlreadyTurning to False
change CurrentMotion to Idle
change ImpactHit to None
}
}

}

action EnterSwim
{
  force(1) AnimAllBody{
    when BasePosture {
  is Idle:
    anim "idle"
      //align false
    //blend 0.1
    //hold 0 seconds
    //looping true
    change AlreadyTurning to True
    change CurrentMotion to Idle
  is Moving:
    when MoveDirection {
    is Forward:
        anim "walk"//run"
        blend 0.1
        hold 0 seconds
        change CurrentMotion to Forward
      is Backward:
        anim "walk_backwards"
        blend 0.1
        hold 0 seconds 
        change CurrentMotion to Backingup 
      }
    }
  } 
}

action LeaveSwim
{
  force(1) AnimAllBody{
    when BasePosture {
  is Idle:
    anim "idle"
      align false
    blend 0.3
    hold 0 seconds
    looping true
    change AlreadyTurning to False
    change CurrentMotion to Idle
  is Moving:
    when MoveDirection {
    is Forward:
        anim "walk"//run"
        blend 0.3
        hold 0 seconds
        change CurrentMotion to Forward
      is Backward:
        anim "walk_backwards"
        blend 0.3
        hold 0 seconds 
        change CurrentMotion to Backingup 
      }
  }
  } 
}

action DoJump
{
  force(1) AnimAllBody
  {
    anim "jump"
    blend .025
    hold 1
    looping false
    FreezeLastSequence true
    change OverridePosture to Falling
  }
}

action trGetReady
{
   change IdleType to Ready
}

action trCalmDown
{
   change IdleType to Normal
}

action trDie
{
  force(1) AnimAllBody
  {
    if(OverridePosture != Dead) {
      anim "death"
      hold 1
      blend 0.1
      align false
      looping false
      change IdleType to Dead
      change AlreadyTurning to False
      change CurrentMotion to Idle
      change Attacking to None
      change OverridePosture to Dead
    }
  } 
}

action PoseBehaviors {
set(1) AnimAllBody
{
when PoseType {
is None:
return
DEFAULT:
anim "pose"
looping true
hold 0
align true
blend 0
change AlreadyTurning to False
change CurrentMotion to Idle
change ImpactHit to None
}
}
}

action Default
{

  // Basic behavior for the whole body
 
  set(1) AnimAllBody
  {   
 
     when OverridePosture {
     is Jumping:
       // NOTE: This is also done in a transition above
       anim "jump"
       blend .025
       hold 1
       looping false
       FreezeLastSequence true
       change OverridePosture to Falling
       stop
     is Falling:
       //anim "fall_loop"
       blend .1
       hold .1
       looping true
       FreezeLastSequence true
       stop
     is Landing:
       //anim "fall_landing"
       blend .1
       hold .5
       looping false
       change OverridePosture to None
       stop
     }
 
      when BasePosture {
      is Idle:
        when MoveType {
        is Swim:
          anim "idle"
        DEFAULT:
  when BaseMode {
  is Combat:
    anim "ready"
  is Normal:
    anim "idle"
  is Pose:
   
  }
        }
        align False
        blend 0.25
        hold 0.25 seconds recycle
        looping True
        change AlreadyTurning to False
        change CurrentMotion to Idle

      is Turning:
        when TurnDirection {
        is Right:
          //anim "turn_right_45"
          change CurrentMotion to TurningRight
        is Left:
          //anim "turn_left_45"
          change CurrentMotion to TurningLeft
        }
        hold 1.0
        if (AlreadyTurning = True) {
          align True   
        }
        else {   
          blend 0.1
          align False
        }
        looping False
        change AlreadyTurning to True
      is Dead:
        anim "dead"
      is Moving:
        when MoveDirection {
        is Forward:
          when MoveType {
          is Swim:
            anim "walk"//run"
          DEFAULT:
            anim "walk"//run"
          }
          blend 0 
          hold 0 seconds
          change CurrentMotion to Forward
        is Backward:
          when MoveType {
          is Swim:
            anim "walk_backwards"
          DEFAULT:
            anim "walk_backwards"
          }
          blend 0.25
          hold 0.25 seconds 
          change CurrentMotion to Backingup   
        }
        looping True
        change AlreadyTurning to False
      }
     when BaseMode {
is Pose:
call PoseBehaviors
is Combat:
when Attacking {
is Sideslash:
anim "Sideslash"
blend .025
        hold 1
              looping false
change Attacking to None
is Swipe:
anim "Sideslash"
blend .025
        hold 1
              looping false
change Attacking to None
is Laser:
//change later
is SpellcastLeft:
//add anim here
}
     }
  } 
}



and it "SHOULD" compile when you upload it.  watch the console for any compile errors regarding it.

you can then work from this to create your own game specific animation script.

you can comment out lines just as you would in HSL using "//" at the lines beginning.

if you see errors(and you will) in the console that says.. cant find animation blah blah blah, its because this
script references an animation you havent uploaded yet.. If you get NO error and get NO animation in game, its because either the animation is NOT referenced in the .aas script OR in the wrong place OR its not been added to the animation.dat file.

Also take a look at this tutorial on setting up these files.   

HE and most games make use of the "walkrun" animation which blends the walk and run animations.

http://hewiki.heroengine.com/wiki/Animation_Sequence
http://hewiki.heroengine.com/wiki/Animating_Characters_Tutorial

Basically, you create your walk animation and its files, then create your run animation and its files then you create a file called walkrun.asq it does NOT have an hgm, it rather references your walk AND run anims and blends them.

Here is a copy of one of ours:

walkrun.asq

Code: [Select]
!
! Animation Sequence Spec
!
Version=1
[ABILITIES]
  Speed Blend
    .SequenceA=walk
    .SequenceB=run
    .SpeedController=Speed
    .LowSpeedA=0
    .HighSpeedA=.4
    .LowSpeedB=.2
    .HighSpeedB=1
    .SequenceAFeedbackName=Feedback_WalkSpeed
    .SequenceBFeedbackName=Feedback_RunSpeed



DPontious

  • General Accounts
  • *
  • Posts: 36
    • View Profile
Re: importing
« Reply #32 on: Dec 01, 15, 04:08:51 PM »

awesome stuff, thanks I will give this a run in the morning! again thanks
Logged

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: importing
« Reply #33 on: Dec 01, 15, 05:22:09 PM »

When i get a chance (pretty busy on our world atm) I'll go through the animation.dat/character.aas files and create a very basic version of each with walk, run, and walkrun  that should work for everyone as a basic set of files.

Unless someone else wants to jump in and offer those up :D

This entire thread might serve as a walkthrough of sorts for folks starting out.

DPontious

  • General Accounts
  • *
  • Posts: 36
    • View Profile
Re: importing
« Reply #34 on: Dec 02, 15, 09:24:29 AM »

here is .aas


Code: [Select]
! biped control
!
!this is a super basic template to start with
!add more stuff and make it do something neat!!


channels
{
  AnimAllBody
  walk
}

inputs
{
  animation = Idle
 
  // Basic inputs used by the HeroEngine_ACCController
  BaseMode = Normal, Combat
  BasePosture = Idle, Turning, Moving, Prone, Dead, Sitting, Kneeling, Alive, Climbing
  OverridePosture = None, Jumping, Falling, Dead, Knockback, ResurrectTarget
  MoveType = Normal, Swim
  IdleType = Normal
  MoveDirection = Forward, Backward
  TurnDirection = None, Right, Left
  TurnAmount = None, T45Degrees, T90Degrees, T135Degrees, T180Degrees
  variable AlreadyTurning =  true, false
  variable CurrentMotion = Idle, TurningLeft, TurningRight, Forward, Backingup, CombatMove
}

action Default
{
  set(1) AnimAllBody
  {
    when animation {
    is Idle:
       anim "idle"
    DEFAULT:
       anim "idle"
    }
   hold 1
   blend 0.1
   align false
   looping true
  }
}

action walk
{
  force(1) AnimAllBody
  {
    anim "walk"
    hold 1
    blend 0.1
    align false
    looping true
    change AlreadyTurning to False
    change CurrentMotion to Idle
    change Attacking to None
  } 
}

here are the other files i change if i understand this right

Code: [Select]
!
! Animation Sequence Spec
! template Sequence generated by Max or Maya output
Version=1
[ABILITIES]
  Apply Animation
    .Animation=walk.hgm
    .InitialSpeed=1
    .InitialLoop=true
    .InitialAlign=true
    .VDA=false
Logged

dhines

  • General Accounts
  • *
  • Posts: 9
    • View Profile
Re: importing
« Reply #35 on: Dec 02, 15, 11:44:40 AM »

The compile errors for your agent script can be fixed by changing a couple of lines in your "walk" action.  See below for code snippet.

Code: [Select]
action walk
{
  force(1) AnimAllBody
  {
    anim "walk"
    hold 1
    blend 0.1
    align false
    looping true
    change AlreadyTurning to false
    change CurrentMotion to Idle
  } 
}

The first error was caused by setting the AlreadyTurning variable to an invalid value, and the second error was caused by referring to a variable that doesn't exist.
Logged

DPontious

  • General Accounts
  • *
  • Posts: 36
    • View Profile
Re: importing
« Reply #36 on: Dec 02, 15, 02:38:20 PM »

ok cool, here are the new errors that popped up Note: that the Node=922 happens when i it space-bar or jump
« Last Edit: Dec 02, 15, 02:48:29 PM by DPontious »
Logged

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: importing
« Reply #37 on: Dec 02, 15, 04:29:37 PM »

you'll need to add "Landing" as shown here in the input defines




Code: [Select]
inputs
{
  animation = Idle
 
  // Basic inputs used by the HeroEngine_ACCController
  BaseMode = Normal, Combat
  BasePosture = Idle, Turning, Moving, Prone, Dead, Sitting, Kneeling, Alive, Climbing
  OverridePosture = None, Jumping, Falling, Dead, Knockback, ResurrectTarget,Landing
  MoveType = Normal, Swim
  IdleType = Normal
  MoveDirection = Forward, Backward
  TurnDirection = None, Right, Left
  TurnAmount = None, T45Degrees, T90Degrees, T135Degrees, T180Degrees
  variable AlreadyTurning =  true, false
  variable CurrentMotion = Idle, TurningLeft, TurningRight, Forward, Backingup, CombatMove
}

OR, remove references to Landing by commenting it out "//" or deleting it.
You can always add these and more back in later as your list of animations/Overrides grows.
I would remove all references to it for now unless you plan to go ahead and setup your Jump/Fall/Landing animations right now.


Also as dHines pointed out, the .aas and .asq files are case sensitive. If you define an input or variable it must be referenced exactly as it was defined, "Case" and all.  Was my bad for not catching it in the copy i pasted in, BUT serves to learn about the case sensitivity anyway heh.
« Last Edit: Dec 02, 15, 04:34:50 PM by ToY-Krun »
Logged

DPontious

  • General Accounts
  • *
  • Posts: 36
    • View Profile
Re: importing
« Reply #38 on: Dec 03, 15, 08:51:09 AM »

Ok a couple things,  box man isn't moving when i hit W, when i hit A or D he just turns once either once to right or to left.  still getting the fall and landing error.  here are the codes
Boxman_03.aas
 
Code: [Select]
! biped control
!
!this is a super basic template to start with
!add more stuff and make it do something neat!!


channels
{
  AnimAllBody
  walk
}

inputs
{
  animation = Idle
 
  // Basic inputs used by the HeroEngine_ACCController
  BaseMode = Normal, Combat
  BasePosture = Idle, Turning, Moving, Prone, Dead, Sitting, Kneeling, Alive, Climbing
  //OverridePosture = None, Jumping, Falling, Dead, Knockback, ResurrectTarget
  MoveType = Normal, Swim
  IdleType = Normal
  MoveDirection = Forward, Backward
  TurnDirection = None, Right, Left
  TurnAmount = None, T45Degrees, T90Degrees, T135Degrees, T180Degrees
  variable AlreadyTurning =  true, false
  variable CurrentMotion = Idle, TurningLeft, TurningRight, Forward, Backingup, CombatMove
}

action Default
{
  set(1) AnimAllBody
  {
    when animation {
    is Idle:
       anim "idle"
    DEFAULT:
       anim "idle"
    }
   hold 1
   blend 0.1
   align false
   looping true
  }
}

action walk
{
  force(1) AnimAllBody
  {
    anim "walk"
    hold 1
    blend 0.1
    align false
    looping true
    change AlreadyTurning to false
    change CurrentMotion to Idle
  } 
}

AnimationSet.dat

Code: [Select]
!
!Basic AnimationSet.dat with a tempalte idle sequence listed
Version=1
[SEQUENCES]
  idle
  walk

walk.asq

Code: [Select]
!
! Animation Sequence Spec
! template Sequence generated by Max or Maya output
Version=1
[ABILITIES]
  Apply Animation
    .Animation=walk.hgm
    .InitialSpeed=1
    .InitialLoop=true
    .InitialAlign=true
    .VDA=false
Logged

Amarak

  • General Accounts
  • *
  • Posts: 281
    • View Profile
Re: importing
« Reply #39 on: Dec 03, 15, 10:37:18 AM »

When you created the walk animation, did you move boxman forward? Movement in HE is handled through the animation itself, so you do need to have translation in the walk and run animations.
Logged

DPontious

  • General Accounts
  • *
  • Posts: 36
    • View Profile
Re: importing
« Reply #40 on: Dec 03, 15, 10:41:43 AM »

no, i just animated the walk movement, darn.  ok so with your experience do you need to move him far while animating, or just move him as far as the walk step would be? 
Logged

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: importing
« Reply #41 on: Dec 03, 15, 11:30:06 AM »

just use the same distance for walk/run/fly and you can adjust the speed via script, OR you can add frames if need be.

DPontious

  • General Accounts
  • *
  • Posts: 36
    • View Profile
Re: importing
« Reply #42 on: Dec 04, 15, 07:41:19 AM »

Just added the movement in with the walk animation, same result. i do notice that the walk animation isn't playing and still not moving forward or backwards. 
Logged

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: importing
« Reply #43 on: Dec 04, 15, 10:42:00 AM »

walk_Backwards is a separate animation/translation.

looking at your .aas.... is that all of it?

it should be in the format exactly of the one i pasted up near the top, with the exception of
animation names/unused variables and of course minus the wrong cased variables lol.

There is no "action walk"

These blocks refer to specific calls that come from HE client, or predefined .

Heres how your .aas script should look:

Code: [Select]
! biped control
!
!

channels
{
  AnimAllBody
}

//**********************************************************
//inputs that cover most common situations
inputs
{
  BaseMode = Normal, Combat, Pose
  BasePosture = Idle, Turning, Moving, Dead, Alive
  variable IdleType = Normal, Dead, Ready
  MoveDirection = Forward, Backward
  TurnDirection = None, Right, Left
  TurnAmount = None, T45Degrees, T90Degrees, T135Degrees, T180Degrees
  variable MoveType = Normal, Swim
  variable AlreadyTurning =  True, False
  variable OverridePosture = None, Jumping, Falling, Landing, Dead
  variable CurrentMotion = CombatMove, Idle, TurningLeft, TurningRight, Forward, Backingup
// basic input modifiers
  variable PoseType = None, SnapShot
//combat
  variable Attacking = None, Sideslash, Swipe, Laser, SpellcastLeft
  variable ImpactHit = None, Blam
}

//*******************************************************
//Transitions between various states
transition OverridePosture {
  from None to Jumping = DoJump
}

transition MoveType {
  from Normal to Swim = EnterSwim
  from Swim to Normal = LeaveSwim
}

transition BasePosture {   
  from Idle to Dead = trDie
  from Moving to Dead = trDie
 
  from Turning to Dead = trDie
}
 

transition BaseMode {
  from Normal to Combat = trGetReady
  from Combat to Normal = trCalmDown
 
  from Normal to Pose = EnterPose
  from Combat to Pose = EnterPose
 
  from Pose to Normal = ReleasePose
  from Pose to Combat = ReleasePose
}

//************************************************************************
//actions called by the above transitions
action ReleasePose
{
change PoseType to None
}

action EnterPose
{
force (1) AnimAllBody {
when PoseType {
Default:
                               
}
}

}

action EnterSwim
{
  force(1) AnimAllBody{
    when BasePosture {
  is Idle:
    anim "idle"
          //align false
    //blend 0.1
    //hold 0 seconds
    //looping true
    change AlreadyTurning to True
    change CurrentMotion to Idle
  is Moving:
    when MoveDirection {
    is Forward:
        //anim "walk"//run"
        blend 0.1
        hold 0 seconds
        change CurrentMotion to Forward
      is Backward:
        //anim "walk_backwards"
        blend 0.1
        hold 0 seconds
        change CurrentMotion to Backingup
      }
    }
  }
}

action LeaveSwim
{
  force(1) AnimAllBody{
    when BasePosture {
  is Idle:
    anim "idle"
      align false
    blend 0.3
    hold 0 seconds
    looping true
    change AlreadyTurning to False
    change CurrentMotion to Idle
  is Moving:
    when MoveDirection {
    is Forward:
        //anim "walk"//run"
        blend 0.3
        hold 0 seconds
        change CurrentMotion to Forward
      is Backward:
        //anim "walk_backwards"
        blend 0.3
        hold 0 seconds
        change CurrentMotion to Backingup
      }
  }
  }
}

action DoJump
{
  force(1) AnimAllBody
  {
    anim "jump"
    blend .025
    hold 1
    looping false
    FreezeLastSequence true
    change OverridePosture to Falling
  }
}

action trGetReady
{
   change IdleType to Ready
}

action trCalmDown
{
   change IdleType to Normal
}

action trDie
{
  force(1) AnimAllBody
  {
    if(OverridePosture != Dead) {
      anim "death"
      hold 1
      blend 0.1
      align false
      looping false
      change IdleType to Dead
      change AlreadyTurning to False
      change CurrentMotion to Idle
      change Attacking to None
      change OverridePosture to Dead
    }
  }
}

action PoseBehaviors {
set(1) AnimAllBody
{
when PoseType {
is None:
return
DEFAULT:
anim "pose"
looping true
hold 0
align true
blend 0
change AlreadyTurning to False
change CurrentMotion to Idle
change ImpactHit to None
}
}
}


//****************************************************************************
//Default actions when either none of the above apply OR in addition to them

action Default
{
//********************************************************************************
  // Basic behavior for the whole body
  //Since by default this is your only channel, put everything else within AnimAllBody
  //IF you create other channels, then you would add them below AnimAllBody using the same format
  set(1) AnimAllBody
  {   
 
     when OverridePosture {
     is Jumping:
       // NOTE: This is also done in a transition above
       anim "jump"
       blend .025
       hold 1
       looping false
       FreezeLastSequence true
       change OverridePosture to Falling
       stop
     is Falling:
       //anim "fall_loop"
       blend .1
       hold .1
       looping true
       FreezeLastSequence true
       stop
     is Landing:
       //anim "fall_landing"
       blend .1
       hold .5
       looping false
       change OverridePosture to None
       stop
     }
 
      when BasePosture {
      is Idle:
        when MoveType {
        is Swim:
          anim "idle"
        DEFAULT:
  when BaseMode {
  is Combat:
    anim "ready"
  is Normal:
    anim "idle"
  is Pose:
   
  }
        }
        align False
        blend 0.25
        hold 0.25 seconds recycle
        looping True
        change AlreadyTurning to False
        change CurrentMotion to Idle

      is Turning:
        when TurnDirection {
        is Right:
          //anim "turn_right_45"
          change CurrentMotion to TurningRight
        is Left:
          //anim "turn_left_45"
          change CurrentMotion to TurningLeft
        }
        hold 1.0
        if (AlreadyTurning = True) {
          align True   
        }
        else {   
          blend 0.1
          align False
        }
        looping False
        change AlreadyTurning to True
      is Dead:
        anim "dead"
      is Moving:
        when MoveDirection {
        is Forward:
          when MoveType {
          is Swim:
            anim "walk"//run"
          DEFAULT:
            anim "walk"//run"
          }
          blend 0
          hold 0 seconds
          change CurrentMotion to Forward
        is Backward:
          when MoveType {
          is Swim:
            anim "walk_backwards"
          DEFAULT:
            anim "walk_backwards"
          }
          blend 0.25
          hold 0.25 seconds
          change CurrentMotion to Backingup   
        }
        looping True
        change AlreadyTurning to False
      }
     when BaseMode {
is Pose:
call PoseBehaviors
is Combat:
when Attacking {
is Sideslash:
anim "Sideslash"
blend .025
        hold 1
              looping false
change Attacking to None
is Swipe:
anim "Sideslash"
blend .025
        hold 1
              looping false
change Attacking to None
is Laser:
//change later
is SpellcastLeft:
//add anim here
}
     }
  }
}


its quite tedious to try to format this im sorry, its an early copy from HJREF example and has been changed and tested with so many times its out of line in places... and notepad++ doesnt want to cooperate atm.
but use this for your entire script THEN weed out things you dont need.

action default is where everything goes pretty much except for special transitions which can go up top.
leaving the animations in the script that you dont have can serve you as a reminder/placeholder for them later on, and wont be called unless you do so from the client. 

It should get you walking, however when you try to attack, you WILL see an error in the console, dont be shocked, its normal, and it will appear until you create an attack animation and add it to each file discussed here in this topic.  once added, it should work fine!     YOu'll have to then do this for each animation you need, and then add your animation in the proper OverridePosture / BasePosture/Mode within the script.


Hope that makes sense lol.



UPDATE:
NOTE:Added a few commented lines along with some ***** to mark them somewhat describing
whats taking place within the script..  maybe it will help.

I went through it again and it should compile okay for you.  I've left all the unused anims in it and even left those that were commented out as a source of reference for later or as example.   when you're comfortable with how its laid out and works, remove all the unneeded blocks/lines/variables.

« Last Edit: Dec 04, 15, 11:09:10 AM by ToY-Krun »
Logged

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: importing
« Reply #44 on: Dec 04, 15, 11:16:10 AM »

(sigh) maybe this will be the last edit lol
I can't verify that the following WILL compile, but it shouldn't be far off


putting this in a new reply to separate it from the last...


if you want an idea of what it would look like if you only needed walk and idle animations:

Code: [Select]
! biped control
!
!

channels
{
  AnimAllBody
}

//**********************************************************
//inputs that cover most common situations
inputs
{
  BaseMode = Normal, Combat, Pose
  BasePosture = Idle, Turning, Moving, Dead, Alive
  variable IdleType = Normal, Dead, Ready
  MoveDirection = Forward, Backward
  TurnDirection = None, Right, Left
  TurnAmount = None, T45Degrees, T90Degrees, T135Degrees, T180Degrees
  variable MoveType = Normal, Swim
  variable AlreadyTurning =  True, False
  variable OverridePosture = None, Jumping, Falling, Landing, Dead
  variable CurrentMotion = CombatMove, Idle, TurningLeft, TurningRight, Forward, Backingup
// basic input modifiers
  variable PoseType = None, SnapShot
//combat
  variable Attacking = None, Sideslash, Swipe, Laser, SpellcastLeft
  variable ImpactHit = None, Blam
}

action Default
{
//********************************************************************************
  // Basic behavior for the whole body
  //Since by default this is your only channel, put everything else within AnimAllBody
  //IF you create other channels, then you would add them below AnimAllBody using the same format
  set(1) AnimAllBody
  {   
 
      when BasePosture {
      is Idle:
        when MoveType {
        is Swim:
          anim "idle"
        DEFAULT:
  when BaseMode {
  is Combat:
    anim "ready"
  is Normal:
    anim "idle"
  is Pose:
   
  }
        }
        align False
        blend 0.25
        hold 0.25 seconds recycle
        looping True
        change AlreadyTurning to False
        change CurrentMotion to Idle

     
      is Moving:
        when MoveDirection {
        is Forward:
          when MoveType {
          DEFAULT:
            anim "walk"//or run or walkrun
          }
          blend 0
          hold 0 seconds
          change CurrentMotion to Forward
        }
        looping True
        change AlreadyTurning to False
      }
  }
}

I left the variables for alreadyTurning etc in because these will be needed as you move forward more than likely.
The client will look for turning animations and also the client checks to see if the character is "turning" or not and so it should be set depending on the animation/situation as it is in the script above.

as far as the blends etc, you can play with those to get the look you want, based on your animations, but this should help you get going.
Pages: 1 2 [3] 4