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

#1 2011-09-23 18:22:21

torcado194
New Scratcher
Registered: 2010-10-11
Posts: 11

help with moving and costume changing

ive run into this problem on many of my games. When I try to change the costume of a sprite while its moving, it stops moving to change the costume.

such as if you have a scrolling game, and an enemy changes sprites. it will stop scrolling just to change the sprite.

its not going to ruin my games but it would make them much more aesthetically pleasing.

is there a way to fix this?

thanks. i tried searching it, but with no luck.

first post

Offline

 

#2 2011-09-23 19:58:15

laptop97
Scratcher
Registered: 2011-06-27
Posts: 1000+

Re: help with moving and costume changing

What is the script(s) for the moving and switching costumes?

Offline

 

#3 2011-09-24 19:22:49

torcado194
New Scratcher
Registered: 2010-10-11
Posts: 11

Re: help with moving and costume changing

Any script that moves a sprite while it changes costumes

Offline

 

#4 2011-09-24 19:23:57

laptop97
Scratcher
Registered: 2011-06-27
Posts: 1000+

Re: help with moving and costume changing

It should work fine then  hmm

Offline

 

#5 2011-09-24 19:40:31

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Re: help with moving and costume changing

Do this. When Flag Clicked, glide (let's just say 1) to x: (let's just say 30) y: (let's just say 5)
Then do another script, When Flag Clicked wait 0.3 seconds switch to costume number


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

#6 2011-09-26 17:33:19

torcado194
New Scratcher
Registered: 2010-10-11
Posts: 11

Re: help with moving and costume changing

ok... that works.
but only because it changes the costume once.
and the game doesn't lag.
my game lags. pretty much only playable in presentation mode. and i want a sprite that changes costumes continuously.
the faster it changes costumes, the slower it moves.
and if you make it move faster, the more jumpy it gets.

Offline

 

#7 2011-09-27 06:23:22

MyRedNeptune
Community Moderator
Registered: 2007-05-07
Posts: 1000+

Re: help with moving and costume changing

If you put the costume-changing and movement into one script, then that's probably the cause of the lag. Place the movement and animation into different scripts.


http://i52.tinypic.com/5es7t0.png I know what you're thinking! "Neptune! Get rid of those filthy advertisements and give us back the Zarathustra siggy, you horrible person!" Well, don't worry about it, the Zara siggy will be back soon, new and improved! ^^ Meanwhile, just do what the sig tells you to. >.>

Offline

 

#8 2011-09-27 17:47:09

torcado194
New Scratcher
Registered: 2010-10-11
Posts: 11

Re: help with moving and costume changing

thanks guys, i got it to work. the problem was because it was the same script. like two of you said. thanks a lot

Offline

 

Board footer