This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2013-01-05 02:59:13

Normo
New Scratcher
Registered: 2012-07-08
Posts: 11

Problems moving sprite with WASD

I'm making a top-down project where you can move your character to different rooms and areas. I'm trying to make a walking animation but it seems to be stuck on the costume 'walk-up' and won't change to the other costumes. If someone could download the project and tell me what I'm doing wrong I would be really grateful!

http://scratch.mit.edu/projects/Normo/3020393

Offline

 

#2 2013-01-05 04:01:39

CrystalStar-
Scratcher
Registered: 2012-11-18
Posts: 6

Re: Problems moving sprite with WASD

The problem is, in the first script with the forever if w key pressed, it constantly broadcasts the "costume-walkup" script while the w key is pressed, so the costume walkup script keeps restarting over and over again, and it can't get to the point where it changes the costume to the next one. Change

broadcast [costume-walkup]
to
broadcast [costume-walkup] and wait

Offline

 

#3 2013-01-05 05:03:17

Normo
New Scratcher
Registered: 2012-07-08
Posts: 11

Re: Problems moving sprite with WASD

CrystalStar- wrote:

The problem is, in the first script with the forever if w key pressed, it constantly broadcasts the "costume-walkup" script while the w key is pressed, so the costume walkup script keeps restarting over and over again, and it can't get to the point where it changes the costume to the next one. Change

broadcast [costume-walkup]
to
broadcast [costume-walkup] and wait

Yay! Thank you. It works fine, now!

Offline

 

Board footer