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

#1 2009-01-29 22:06:04

techstars
Scratcher
Registered: 2008-10-07
Posts: 8

I need to know somthing

Hello  smile  Im trying to make a sonic game and I need to know how to make it so when you stop making you guy move he gets out of move position

Offline

 

#2 2009-01-30 01:49:41

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: I need to know somthing

if(key is down (movmentkey)){
goto costume(first run costume)
repeate(number of run costumes){
next costume
}
}else{
goto costume (stop costume)
}

hope that works for u

Offline

 

#3 2009-01-30 04:16:48

pokemon_master12
Scratcher
Registered: 2008-09-26
Posts: 100+

Re: I need to know somthing

Just add this script:

[blocks]<when[ left arrow ]key pressed>[/blocks]
[blocks]<if>[/blocks][blocks]<key[ left arrow ]pressed?>[/blocks]
[blocks]<switch to costume[ moving[/blocks]
[blocks]<else>[/blocks]
[blocks]<switch to costume[ not moving[/blocks]
[blocks]<end>[/blocks]

This script means that when you press an arrow key, he switches to his "moving" costume, which makes him look like he's moving along the screen. But when you're not pressing anything, he just switches to his other costume that looks like he's just standing, sitting, or whatever you want him to do whilst he's not moving.
Hope this helps! If it doesn't, just let me know and I will look into it for you!

Happy Scratch-ing!  smile


My Dragon Egg! http://dragcave.net/image/5YUA.gif
Visit my blog: http://freyasworld.wordpress.com/

Offline

 

Board footer