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

#1 2012-05-24 23:17:42

royjrdude
New Scratcher
Registered: 2012-05-24
Posts: 5

walking engines

I'm trying to make a pokemon type game but, with nothing to do with pokemon just the walkabout interactions and battle mechanics and I'm stuck on the engine for walking I have back n forth motions down but I cannot figure how to make my char go up n down? Some pointers will be apreciated thanks

Offline

 

#2 2012-05-25 17:13:34

silvershine
Scratcher
Registered: 2010-11-21
Posts: 500+

Re: walking engines

I'm pretty sure I understand what you need, correct me if I'm wrong.  smile

when gf clicked
forever
if <key [up arrow v] pressed?>
change y by (5)
end
if <key [down arrow v] pressed?>
change y by (-5)
end
if <key [left arrow v] pressed?>
change x by (-5)
end
if <key [right arrow v] pressed?>
change x by (5)
end
end

Last edited by silvershine (2012-05-25 17:14:09)

Offline

 

#3 2012-05-25 22:13:20

daniel_j
Scratcher
Registered: 2012-05-22
Posts: 100+

Re: walking engines

Yeah silvershine's script is correct, but i am wondering are you creating a game that will be scrolling up+down+left+right if so, the script above will need to be different! more Information is needed if you are creating a scroller!


http://i50.tinypic.com/2dhgnsx.jpg

Offline

 

#4 2012-05-25 22:44:02

silvershine
Scratcher
Registered: 2010-11-21
Posts: 500+

Re: walking engines

daniel_j wrote:

Yeah silvershine's script is correct, but i am wondering are you creating a game that will be scrolling up+down+left+right if so, the script above will need to be different! more Information is needed if you are creating a scroller!

Check out this wiki topic if you would like to learn more about scrolling.  wink

Offline

 

#5 2012-05-26 02:45:22

royjrdude
New Scratcher
Registered: 2012-05-24
Posts: 5

Re: walking engines

Thank-you guys for the help I got it all under control now all I have to do is create a turn base battle engine and my first demo will be ready

Offline

 

#6 2012-05-26 13:43:01

sanjayraj
Scratcher
Registered: 2012-03-25
Posts: 500+

Re: walking engines

silvershine's script is for moving with arrow keys, if that's what you want.


http://i46.tinypic.com/23sw40j.png

Offline

 

Board footer