I'm trying to script my characters run animation, but it's not working. When i click the W or forward arrow key the character does not respond what so ever...
The animation works fine in the HeroEngine Viewer, and the same .aas script has scripting for jumping, which works. So it's just an issue with moving.
Here's my BasicHM.aas file
! biped control
!
!this is a super basic template to start with
!add more stuff and make it do something neat!!
channels
{
AnimAllBody
}
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, Landing, 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
}
transition OverridePosture
{
from None to Jumping = DoJump
}
action DoJump
{
anim "Jump"
blend 1
hold 1
looping false
FreezeLastSequence true
}
action Default
{
set(1) AnimAllBody
{
when OverridePosture
{
is Jumping:
anim "Jump"
blend 1
hold 1
looping false
FreezeLastSequence true
stop
is Falling:
anim "Jump"
blend 1
hold 1
looping false
FreezeLastSequence true
stop
is Landing:
anim "idle"
blend .1
hold .5
looping false
stop
}
when BaseMode
{
is Normal:
when BasePosture
{
is Idle:
when MoveType
{
is Normal:
anim "idle"
DEFAULT:
anim "idle"
}
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 Left:
anim "run"
change CurrentMotion to TurningLeft
is Right:
anim "run"
change CurrentMotion to TurningRight
}
hold 1.0
if (AlreadyTurning = true)
{
align True
}
else
{
blend 0.1
align False
}
looping False
change AlreadyTurning to true
is Moving:
when MoveDirection
{
is Forward:
when MoveType
{
is Normal:
anim "run"
DEFAULT:
anim "run"
}
blend 0
hold 0 seconds
change CurrentMotion to Forward
is Backward:
when MoveType
{
is Normal:
anim "run"
DEFAULT:
anim "run"
}
blend 0
hold 0 seconds
change CurrentMotion to Backingup
}
looping True
change AlreadyTurning to false
}
}
}
}
Here's my run.asq file
!
! Animation Sequence Spec: run
! 06/21/2013 14:36
!
Version=1
[ABILITIES]
Apply Animation
.Animation=Run.hgm
.InitialSpeed=1
.InitialLoop=True
.InitialAlign=False
.Preload=False
Here's my ANIMATIONSET.dat file
!
!
Version=1
[SEQUENCES]
idle
Jump
run