OK so, how do I make something go up and down? I can make them go right:
if Right key pressed
move 10 spaces
and left
if Left key pressed
move -10 spaces
but I cant make them go up or down! How do I do it!? HELP!
Offline
Foxgirlgamer wrote:
OK so, how do I make something go up and down? I can make them go right:
if Right key pressed
move 10 spaces
and left
if Left key pressed
move -10 spaces
but I cant make them go up or down! How do I do it!? HELP!
r u new at scratch?
Offline
Yes, very, I downloaded it yesterday
Offline
Foxgirlgamer wrote:
Yes, very, I downloaded it yesterday
oh, well welcome to scratch!
Offline
Thank you, its fun
Offline
Foxgirlgamer wrote:
Thank you, its fun
your welcome, i like it alot too!
Offline
quick tip about X and Y. X is the Horizontal movement of a sprite (left and right) changing it will make it go left or right (positive right negative left). They Y is the vertical movement (up and down) positive up negative down. Moving steps is going in the direction that the sprite is pointing at.
Offline
ooo! I know this one
<when[ up ]key pressed>
<change y by( somthin positive)
<stop script>
<when[ down ]key pressed>
<change y by( something negative)
<stop script>
Offline
Xzeleous wrote:
ooo! I know this one
![]()
<when[ up ]key pressed>
<change y by( somthin positive)
<stop script>
<when[ down ]key pressed>
<change y by( something negative)
<stop script>
[/blocks]
You don't actually need the stop script blocks, but that would be how you do it.
Offline
no. The above should NOT be done. This is completly incorrect scripting. the when X key pressed script head is used for things such as typing, as it works simaler (has a delay before looping). I'll quickly make a flash project with these two to show how it works.
Offline
http://spamtheweb.com/ul/upload/020309/52103_Event_Head_loop_example.php
All you need to know in this example is that event head method is the one above and loop is one that looks like this
<when green flag clicked>
<forever>
<if>(Key right is pressed)
<change x by( 4 )
<end>
<if>(Key Left is pressed)
<change x by( -4)
<end>
<end>
Offline