1 decade ago by SlinkyDinky
Is there a way to run an animation once during a button press? I tried the following without luck...
This animation runs, but is reset to 'idle' before it finishes...
EDIT - Found this: http://impactjs.com/forums/help/waiting-for-animation-to-finish/page/1, which mindblowingly is exactly the same enquiry.
if(ig.input.pressed('shoot'){
this.currentAnim = this.anims.shoot;
if(this.currentAnim.loopCount > 1){
this.currentAnim = this.anims.idle;
}
}
This animation runs, but is reset to 'idle' before it finishes...
EDIT - Found this: http://impactjs.com/forums/help/waiting-for-animation-to-finish/page/1, which mindblowingly is exactly the same enquiry.
