Discuss Scratch

zantman1000
Scratcher
20 posts

questions

1. How do I make it so that if a sprite walks then it displays the animation, and that if it isn't moving then it stays in the direction of it's previous movement?
2. How do I make it so that several things have to be happening at once in order for anouther to happen ex. if I wanted to make it so that shift and right arrow key have to be pressed for the sprite to walk or sprint?
3. Is it possible to have a keyboard input to be in a toggle setting?

Last edited by zantman1000 (Jan. 27, 2014 00:09:52)


Enzyme “Σ”
1234abcdcba4321
Scratcher
1000+ posts

questions

zantman1000 wrote:

1. How do I make it so that if a sprite walks then it displays the animation, and that if it isn't moving then it stays in the direction of it's previous movement?
What's your current script/project?
2. How do I make it so that several things have to be happening at once in order for anouther to happen ex. if I wanted to make it so that shift and right arrow key have to be pressed for the sprite to walk or sprint?
Can't do shift, but
<<key [right arrow v] pressed?> and <>>
3. Is it possible to have a keyboard input to be in a toggle setting?
Nope

I'd highly appreciate it if you were to follow me. Don't forget to go to my profile.
All of my programming suggestions <— You should really get the suggestions move back to the suggestions forum!
Five hundred posts! I never expected to get up there… In only 2-3 months.
Does anyone know what a signature is? I mean, I've already seen 6-7 people get confused.
TheOatBaron
New to Scratch
41 posts

questions

1. I think it does that be default… I could be wrong. (Using the move () steps block)
2. You can't use the shift key, but for example here right arrow and w would have to be pressed to move right
when green flag clicked
forever
if <<key [right arrow v] pressed?> and <key [w v] pressed?>> then
change x by (2)
end
end
3. Yes, with a variable surrounding the movement. Here the q key would toggle the keyboard

when green flag clicked
set [keyboard v] to [on]

when [q v] key pressed
if <(keyboard) = [on]> then
set [keyboard v] to [off]
else
set [keyboard v] to [on]
end

when [movement v] key pressed
if <(keyboard) = [on]> then
do movement
end

Powered by DjangoBB