View Single Post
  #18  
Old 10-18-2010, 10:16 PM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Quote:
Originally Posted by Cubical View Post
I'm currently having a problem where it won't set the players animation back to whatever mode after it's completed. For instance I use the sword gani while walking and it will set the animation to idle while I'm moving. I know it's probably just 1 line that I need but I'm kinda having a brainfart. Could anyone help me with it. I figured this would be the thread to post for help in since I pretty much used this as a base.

PHP Code:
enum {
  
blah,blah,blah
}
function 
onCreated(){
  
setTimer(0.05);
}
function 
onTimeout(){
  
doStuff();
}
function 
doStuff(){
  
onSetIdle();
  
//do movement and action checks
  
onAnimate();
  
setTimer(0.05);
}
function 
onSetIdle(){
  
this.movemode IDLE;
}
function 
onAnimate(){
  if (!(
this.oldmode == this.movemode)){
    
player.chat player.ani;
    
setani(this.defaultganis[this.movemode], null);
    
this.oldmode this.movemode;
  }   

From the looks of that script it would seem like the sword gani would only last 1 frame before idle kicks back in, have you considered making a function/variable such as pauseGanis(time); to accompany such things as slashing?
Reply With Quote