I want my character to switch to a still costume when it is not moving and using the "run costumes". I have tried if/else block however that doesn't work because it glitches up my "next costume" when i'm moving. I also don't want it to interfere with my other scripts (which change to other costumes) in the same character.
Thanks
Offline
Bombguy2010 wrote:
I want my character to switch to a still costume when it is not moving and using the "run costumes". I have tried if/else block however that doesn't work because it glitches up my "next costume" when i'm moving. I also don't want it to interfere with my other scripts (which change to other costumes) in the same character.
Thanks
An easy solution is this:
(if there is one run sprite)
Here, costume 2 = run sprite
costume 1 = stand sprite
when gf clicked forever if <[x] pressed> repeat [5] point in direction [90] switch to costume [2] move [5] steps wait [0.1] secs switch to costume [1] move [5] steps else say [ ]However, if there are two run sprites to be used when running:
when gf clicked forever if [x] pressed repeat [5] point in direction [90] switch to costume [2] move [3.33] steps wait [0.1] secs switch to costume [3] move [3.33] steps wait [0.1] secs switch to costume [1] move [3.33] steps else say [ ]Here, 'x' has to be replaced by whichever key is to be pressed to move right.
point in direction [90]is to be replaced with
point in direction [-90]
Offline
I have many run sprites (6-7) what do i do?
Offline
Bombguy2010 wrote:
I have many run sprites (6-7) what do i do?
In that case, either use just one or two run costumes OR do this :-
when gf clicked switch to costume [1] forever if <key [x v] pressed?> point in direction [90] switch to costume [2] move [1.5] steps wait [0.1] secs switch to costume [3] move [1.5] steps wait [0.1] secs switch to costume [4] move [1.5] steps wait [0.1] secs switch to costume [5] move [1.5] steps wait [0.1] secs switch to costume [6] move [1.5] steps wait [0.1] secs switch to costume [7] move [1.5] steps wait [0.1] secs switch to costume [1] else say [ ]I hope that this helps you
Offline