Discuss Scratch

fishgood_
New Scratcher
2 posts

Playable character not doing Idle animation

My playable character will not do its idle animation after I gave it a walking animation.

Here is the game
-JS_Test-
Scratcher
53 posts

Playable character not doing Idle animation

fishgood_ wrote:

My playable character will not do its idle animation after I gave it a walking animation.

Here is the game

The reason why he's not moving is because the broadcast “startwalkcycle” is stopping all the other scripts in the sprite, meaning that the script where he's “changing costumes” is not being executed
AHypnoman
Scratcher
1000+ posts

Playable character not doing Idle animation

This is a combination of a few problems:

Your idle animation will only start if no keys are pressed when the game starts. Swap the position of the if block and forever loop.

Your “stop walk cycle” broadcast stops every other block in the sprite from running, including your idle animation. You will need to make the idle animation start again after the walk cycle has stopped.

(I don't think this needs fixing but it might be worth doing to make sure you encounter no bugs in the future) Your “do walk cycle” and “start walk cycle” block are strangely entangled with one another. This could lead to future errors.
TypicalGuyNotFound
Scratcher
28 posts

Playable character not doing Idle animation

fishgood_ wrote:

My playable character will not do its idle animation after I gave it a walking animation.

Here is the game

fishgood_ wrote:

My playable character will not do its idle animation after I gave it a walking animation.

Here is the game
Theres a bunch of problems, but look at what I did: https://scratch.mit.edu/projects/961169788. It's a decent start, but can be improved. If you use this, please give credit.

Last edited by TypicalGuyNotFound (Feb. 4, 2024 21:48:30)

TutoeTurtle
Scratcher
85 posts

Playable character not doing Idle animation

Another problem is that the “Startgame” broadcast runs continually, which resets the idle animation script each tick, so nothing happens.
fishgood_
New Scratcher
2 posts

Playable character not doing Idle animation

Thanks for the help everyone! I managed to solve the problem.

Powered by DjangoBB