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
Any script that moves a sprite while it changes costumes
Offline
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
Offline
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
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.
Offline
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