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;
}
}