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

Author Topic: importing  (Read 8454 times)

ToY-Krun

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

This seems as good a time as any to offer some explanation as to what goes on in this script, perhaps for those who are new to animation scripts or scripting in general.

If you see an error feel free to point it out, and if you have something to add, feel free to do that as well.



Code: [Select]
! biped control
!
!
//IF you have setup more than the default channel for your model, then add them here
channels
{
  AnimAllBody
}

//**********************************************************
//inputs block contains definitions of all valid inputs along with any variables and their valid values
//ALL content in this script is case sensitive
//inputs that cover most common situations
inputs
{
  //You may NOT change the value of BaseMode/BasePosture from within this script, these
  //are set from within the client and/OR HSL script.  You MAY however add new valid
  //states to them within this define block.
  BaseMode = Normal, Combat, Pose
  BasePosture = Idle, Turning, Moving, Dead, Alive
  //Variables may be changed from within this script and/OR by HSL script
  //the following variables are used by HeroEngine client, BUT must be defined here in order
  //to access them within this script.
  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
  //Now some descriptive comments as to what is taking place in this section, step by step:
 
  //client detects what channel the model is using:
  //channel AnimAllBody which is the default channel:
  set(1) AnimAllBody
  {   
      //Client detects the BasePosture of the model  
      when BasePosture {
  //(A) client detects what the value of (A) or , BasePosture is
      is Idle:
    //(B) client detects what the current MoveType is
        when MoveType {
        //so if A = Idle and B = Swim then the script tells the client to play the "idle_swim" animation
        is Swim:
          //anim "idle_swim"
        DEFAULT:
//OTHERWISE if B does NOT equal Swim, then check to see what BaseMode the model is in
  when BaseMode {
  //if the client detects the model is in Combat then play the ready animation
  is Combat:
    anim "ready"
  //if the client detects the model is in Normal baseMode then play the normal or "idle" animation
  is Normal:
    anim "idle"
      //here you could create and use a pose animation if you like
  is Pose:
   
  }
        }
//the following settings are applied to any animation that is called above,
        //OR you could set these per animation above and remove them from here
        align False
        blend 0.25
        hold 0.25 seconds recycle
        looping True
        change AlreadyTurning to False
        change CurrentMotion to Idle

      //if you are pressing a movement key of any sort, then THIS block is being scanned continously
      is Moving:
    //so, a movement key is being pressed... which direction?
        when MoveDirection {
//if the model is being told to move forward the script tells the client to play the walk animation, thus moving the character
        is Forward:
          when MoveType {
          DEFAULT:
            anim "walk"//or run or walkrun
          }
          blend 0
          hold 0 seconds
          change CurrentMotion to Forward
        }
//NOTE: so long as the key is pressed, looping is set to true which tells the client to keep looping the animation
//until its told otherwise
        looping True
        change AlreadyTurning to False
      }
  }
}

DPontious

  • General Accounts
  • *
  • Posts: 36
    • View Profile
Re: importing
« Reply #46 on: Dec 04, 15, 07:59:13 PM »

bare with me good sir, loaded your script worked fine was able to possess and move him, the only issue was he wouldn't stop moving.
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
      }
  }
}
Logged

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: importing
« Reply #47 on: Dec 04, 15, 08:57:59 PM »

Lol.  That can be caused by a few things.

Lets try this first.. replace all of your .aas script with the following:


iirc it needs some measure of control for turning in the script..
if it isnt stopped/started correctly npcs may move/not move correctly as they get hung up in
turn mode.  I've commented out the actual animations so it should be fine, as it will still set
turning on/off as it should based on your movement.



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 Turning:
when BaseMode {
is Normal:
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 Combat:
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 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'm assuming there have been no changes to the Input_Command script on the client side and/or changes to the gameKeyBindings.ini file and/or controller scripts on the client side.


Edit: if this doesnt help, let us know.
also see if you can stop him by moving other directions (back/side to side) or jumping.


your reply brought yosimite sam to mind lol.. got a good laugh!
"Whoa mule whoa!!! When i say whoa, i mean whoa!"
https://youtu.be/3-vMzPi3IDg
« Last Edit: Dec 04, 15, 09:10:16 PM by ToY-Krun »
Logged

DPontious

  • General Accounts
  • *
  • Posts: 36
    • View Profile
Re: importing
« Reply #48 on: Dec 04, 15, 09:49:59 PM »

ok, tryed new script,  nothing been changed to the   Input_Command script or changes to the gameKeyBindings.ini file, or controller scripts on the client side.   i also tryed to stop using other commands such as jump and stuff/.
Logged

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: importing
« Reply #49 on: Dec 04, 15, 09:55:58 PM »

in your walk.asq file, replace all of its contents with the following:


Code: [Select]
!
! Animation Sequence Spec: walk
! 08/30/2013 11:12
!
Version=1
[ABILITIES]
  Apply Animation
    .Animation=walk.hgm
    .InitialSpeed=0.7
    .InitialLoop=True
    .InitialAlign=True
    .Preload=False


If that doesnt work, how many frames are there in your walk animation and how far does it go?
It may be that the animation simply isnt completed.  give it some time and see if it stops eventually
« Last Edit: Dec 04, 15, 10:01:42 PM by ToY-Krun »
Logged

DPontious

  • General Accounts
  • *
  • Posts: 36
    • View Profile
Re: importing
« Reply #50 on: Dec 04, 15, 10:01:24 PM »

same, however think i have to take a break for a little, been at this all day, ill be back at it in the morning.    there are 25 frames and he goes to the end of the map if i let him lol have to delete him lol
« Last Edit: Dec 04, 15, 10:05:44 PM by DPontious »
Logged

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: importing
« Reply #51 on: Dec 04, 15, 11:21:22 PM »

okay tomorrow, login, go to Select Mode in the blade (3rd tool from the left in tool bar up at the top)
and select your npc, he should be surrounded by a yellow box.
Now go back to character mode (first tool in the tool bar) and possess the npc while hes still selected.

Then from the Blade Editors menu, choose animation.
Animation set tab, and click the button beside the "set" field and navigate to the animation.dat file for your character and open it.

Now go to the Animation Control tab.

Start the character moving while hes still selected, and

from the bottom of the Agent Override section, copy/paste here the contents of the text box there.
should look something like this:

Code: [Select]
behave 9223372063519022325 anim AnimAllBody argue always 1 1 false false 0.1 false

then what are the values of :
TurnDirection:
OVerridePosture:
MoveType:
MoveDirection:
IdleType:
CurrentMotion:
BasePosture:
BaseMode:
AlreadyTurning:


remember you'll need the npc targeted, and moving before getting these values.

DPontious

  • General Accounts
  • *
  • Posts: 36
    • View Profile
Re: importing
« Reply #52 on: Dec 05, 15, 09:30:07 AM »

here are the results, i turned his clock speed down so he wouldnt run off map.  and the last two at the bottom i think was attack which was blank, and the last one was alreadyturning = fals, also noticed that when i hit forward in the currentmotion box, however once i release it it goes to idle yet he moves.  don't know if that info helps or not, just noticed it.

« Last Edit: Dec 05, 15, 10:14:54 AM by DPontious »
Logged

ToY-Krun

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

hrm okay.  OverridePosture should not be landing.



Try replacing the .aas contents with the following, this adds blocks that alter overrideposture based on current settings for states like Landing, jumping etc, however at the moment you're only worried about Landing since that is what your character insists hes doing.


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 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 .025
       hold 1
       looping false
       FreezeLastSequence true
   //Change OverridePosture to Landing
       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 BaseMode {
is Normal:
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 Combat:
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 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
      }
  }
}
Pages: 1 2 3 [4]