Stupid Game Bug

theWallkening.wick (92.4 KB)

Hey, so I’m having trouble with my little project here. What I want to happen is each time you hit the wall, you explode and reset back to your position, but the explode animation plays as you reset. Can I get any help??

Hey @pineappleoak67, welcome back to the wick forums! It’s been a while.

I found the issue:

Wick tries to run all types of loops function (for, forEach, while, etc.) at once, therefore, the animation becomes unnoticeable even though the clip is moving between the frames.

A better way to deal with this would be to play the clip at the start of the exploding animation, and wait until the clip’s frame is equal to 25 (the last frame of the exploding animation) before resetting the player to the default position.

To do this, you should update your explode function code to this:

    explode(){
        if(this.clip.currentFrameNumber<17){
            this.clip.gotoAndPlay(17);
        }
        if(this.clip.currentFrameNumber===25){
            this.clip.x=100;
        }
    }

Make sure to change the numbers if you’d like to add more frames to the animation
Let me know if this doesn’t work

1 Like

Thanks!! THIS IS ONLY THE BEGINNING.

2 Likes