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

#1 2008-04-08 18:41:01

viper650
Scratcher
Registered: 2008-04-04
Posts: 36

looking for a running script!

Im making a game with a ninja for the character. the ninja has different costumes for it to run. i want the ninja to cycle through those costumes when i press right and i want it to move right smoothly. does anyone have a great script for running?

Offline

 

#2 2008-04-09 14:10:14

viper650
Scratcher
Registered: 2008-04-04
Posts: 36

Re: looking for a running script!

This is what i have so far and its really choppy.

<when[ right arrow ]key pressed>
<point in direction( 90 degrees
<switch to costume[ sasuke running
<change x by( 10

Repeat the above with different costumes.
This isnt working very well. Help please!

Offline

 

#3 2008-04-09 14:23:01

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: looking for a running script!

Well, the first thing you might want to do is switch to the Sensing block for When Key pressed, that makes thing smoother.

[blocks]
<when green flag clicked>
<forever>
<if><key[ Right Arrow ]pressed?>

(do your motion stuff here)

<end>
<end>
[/blocks]

And put another IF block in for each key you are using to control (left arrow, up arrow, etc)

Last edited by Paddle2See (2008-04-09 14:24:00)


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#4 2008-04-09 14:28:45

viper650
Scratcher
Registered: 2008-04-04
Posts: 36

Re: looking for a running script!

That did make it better. do you have a jumping script i can use with that?
I have yet to find a good jump script

Offline

 

#5 2008-04-09 15:23:27

EdnaC
Scratcher
Registered: 2007-08-28
Posts: 100+

Re: looking for a running script!

There are several different ways to jump in the demo projects in the "Gravity to Games" gallery.

-MrEd

Offline

 

#6 2008-04-09 18:11:20

viper650
Scratcher
Registered: 2008-04-04
Posts: 36

Re: looking for a running script!

Thanks!

Offline

 

Board footer