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

#1 2012-09-18 18:27:56

RoboNeo9
Scratcher
Registered: 2012-05-09
Posts: 100+

Scratch Tips and Tricks

here is a list of tips and tricks that will help you in scratch. if you know any others please tell me. it will start small.

if you want to make a good jumper do this

when [up arrow v] key pressed
reapeat (10) times
 change x by (5)
end

Offline

 

#2 2012-09-18 19:14:04

kayybee
Scratcher
Registered: 2009-12-07
Posts: 1000+

Re: Scratch Tips and Tricks

RoboNeo9 wrote:

here is a list of tips and tricks that will help you in scratch. if you know any others please tell me. it will start small.

if you want to make a good jumper do this

when [up arrow v] key pressed
repeat (10) times
 change x by (5)
end

Um... that will only make it go up...

Offline

 

#3 2012-09-18 19:29:21

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Scratch Tips and Tricks

RoboNeo9 wrote:

here is a list of tips and tricks that will help you in scratch. if you know any others please tell me. it will start small.

if you want to make a good jumper do this

when [up arrow v] key pressed
if <touching [ground v]?>
 repeat (10)
  change y by (5)
  wait (0.03) secs
 end
 repeat (10)
  change y by (-5)
  wait (0.03) secs
 end
end

I edited your script to make it better. Anyway, nice tip!

Last edited by ErnieParke (2012-09-23 19:47:22)


http://i46.tinypic.com/35ismmc.png

Offline

 

#4 2012-09-18 19:51:09

bullelk12
Scratcher
Registered: 2012-05-26
Posts: 100+

Re: Scratch Tips and Tricks

Well, that's not the best way to do it. No offense. Try the script below.

Last edited by bullelk12 (2012-09-18 19:59:04)


http://mag.racked.eu/cimage/i6000/Achievement++get%21/Scratcher+love+minecraft%21/mca.png

Offline

 

#5 2012-09-18 19:57:09

bullelk12
Scratcher
Registered: 2012-05-26
Posts: 100+

Re: Scratch Tips and Tricks

when gf clicked
set [gravity v] to (-.4)
set [velocity v] to (0)
forever 
if <touching [ground v]?>
set [velocity v] to (0)
else
change [velocity v] by (gravity)
change y by (velocity)
when gf clicked
forever if <key [space v] pressed?>
if <(yvelocity) = (0)>
set [jumping v] to (1)
repeat (10)
change [yvelocity v] by <(gravity) * (-1.4)>
end
set [jumping v] to (0)


http://mag.racked.eu/cimage/i6000/Achievement++get%21/Scratcher+love+minecraft%21/mca.png

Offline

 

#6 2012-09-23 16:53:28

RoboNeo9
Scratcher
Registered: 2012-05-09
Posts: 100+

Re: Scratch Tips and Tricks

bullelk12 wrote:

when gf clicked
set [gravity v] to (-.4)
set [velocity v] to (0)
forever 
if <touching [ground v]?>
set [velocity v] to (0)
else
change [velocity v] by (gravity)
change y by (velocity)
when gf clicked
forever if <key [space v] pressed?>
if <(yvelocity) = (0)>
set [jumping v] to (1)
repeat (10)
change [yvelocity v] by <(gravity) * (-1.4)>
end
set [jumping v] to (0)

The other one is better for new scratchers though.

Offline

 

#7 2012-09-23 19:31:03

awesomeness321
Scratcher
Registered: 2012-08-10
Posts: 100+

Re: Scratch Tips and Tricks

RoboNeo9 wrote:

here is a list of tips and tricks that will help you in scratch. if you know any others please tell me. it will start small.

if you want to make a good jumper do this

when [up arrow v] key pressed
repeat (10)
 change x by (5)
end

Fixed.
And that will only make it go up-- no, wait, it would go sideways! You're getting X and Y confused.  tongue

Here is a better jumping script (if you're trying to make a game.):

when gf clicked
set [yv v] to (0)
forever
 if <key [up arrow v] pressed?>
  if <touching [ground v]?>
   repeat (20)//At least I think it should be 20...
    change [yv v] by (0.5)//I think it's 0.5...
   end
   set [yv v] to (0)//Added, so it can go down. Satisfied?
   repeat (20)
   change [yv v] by (-0.5)
   end
   set [yv v] to (0)//NOW is it okay????
 end
end
end
end



When gf clicked
forever
  change y by (yv)
EDIT:There. Now it's a better script (and it does change y position now!) I was going to put the "forever change y by yv", but I forgot.  tongue

Last edited by awesomeness321 (2012-09-25 20:07:25)


My newest project:http://blocks.scratchr.org/API.php?user=awesomeness321&amp;action=projects&amp;type=newest&amp;return=image&amp;num=1Color:#30F9A5 I am currently http://blocks.scratchr.org/API.php?user=awesomeness321&amp;action=onlineStatus&amp;type=text

Offline

 

#8 2012-09-23 19:35:25

Molybdenum
Scratcher
Registered: 2012-06-17
Posts: 1000+

Re: Scratch Tips and Tricks

awesomeness321 wrote:

RoboNeo9 wrote:

here is a list of tips and tricks that will help you in scratch. if you know any others please tell me. it will start small.

if you want to make a good jumper do this

when [up arrow v] key pressed
repeat (10)
 change x by (5)
end

Fixed.
And that will only make it go up-- no, wait, it would go sideways! You're getting X and Y confused.

Here is a better jumping script (if you're trying to make a game.):

when gf clicked
forever
 if <key [up arrow v] pressed?>
  if <touching [ground v]?>
   repeat (20)//At least I think it should be 20...
    change [yv v] by (0.5)//I think it's 0.5...
   end
   repeat (20)
   change [yv v] by (-0.5)
   end
 end
end

That will make the object accelerate up for a bit, then accelerate down, then no acceleration. Basically, you moved the object up.

Last edited by Molybdenum (2012-09-23 19:35:39)


"The Enrichment Center is required to remind you that you will be baked, and then there will be cake."
(|Balls and Platforms: Stay on!|) (|NaOS-H: An operating system... Or is it?|)

Offline

 

#9 2012-09-23 20:37:20

zubblewu
Scratcher
Registered: 2011-02-17
Posts: 1000+

Re: Scratch Tips and Tricks

Molybdenum wrote:

awesomeness321 wrote:

RoboNeo9 wrote:

here is a list of tips and tricks that will help you in scratch. if you know any others please tell me. it will start small.

if you want to make a good jumper do this

when [up arrow v] key pressed
repeat (10)
 change x by (5)
end

Fixed.
And that will only make it go up-- no, wait, it would go sideways! You're getting X and Y confused.

Here is a better jumping script (if you're trying to make a game.):

when gf clicked
forever
 if <key [up arrow v] pressed?>
  if <touching [ground v]?>
   repeat (20)//At least I think it should be 20...
    change [yv v] by (0.5)//I think it's 0.5...
   end
   repeat (20)
   change [yv v] by (-0.5)
   end
 end
end

That will make the object accelerate up for a bit, then accelerate down, then no acceleration. Basically, you moved the object up.

No. He's just changing a variable and not the y position  tongue


........................................................................................................................................................................................................................................

Offline

 

#10 2012-09-23 21:09:44

Molybdenum
Scratcher
Registered: 2012-06-17
Posts: 1000+

Re: Scratch Tips and Tricks

zubblewu wrote:

Molybdenum wrote:

awesomeness321 wrote:


Fixed.
And that will only make it go up-- no, wait, it would go sideways! You're getting X and Y confused.

Here is a better jumping script (if you're trying to make a game.):

when gf clicked
forever
 if <key [up arrow v] pressed?>
  if <touching [ground v]?>
   repeat (20)//At least I think it should be 20...
    change [yv v] by (0.5)//I think it's 0.5...
   end
   repeat (20)
   change [yv v] by (-0.5)
   end
 end
end

That will make the object accelerate up for a bit, then accelerate down, then no acceleration. Basically, you moved the object up.

No. He's just changing a variable and not the y position  tongue

Good point.


"The Enrichment Center is required to remind you that you will be baked, and then there will be cake."
(|Balls and Platforms: Stay on!|) (|NaOS-H: An operating system... Or is it?|)

Offline

 

#11 2012-09-24 18:11:38

awesomeness321
Scratcher
Registered: 2012-08-10
Posts: 100+

Re: Scratch Tips and Tricks

Molybdenum wrote:

zubblewu wrote:

Molybdenum wrote:


That will make the object accelerate up for a bit, then accelerate down, then no acceleration. Basically, you moved the object up.

No. He's just changing a variable and not the y position  tongue

Good point.

Okay, I fixed it.


My newest project:http://blocks.scratchr.org/API.php?user=awesomeness321&amp;action=projects&amp;type=newest&amp;return=image&amp;num=1Color:#30F9A5 I am currently http://blocks.scratchr.org/API.php?user=awesomeness321&amp;action=onlineStatus&amp;type=text

Offline

 

#12 2012-09-24 18:21:51

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Scratch Tips and Tricks

awesomeness321 wrote:

RoboNeo9 wrote:

here is a list of tips and tricks that will help you in scratch. if you know any others please tell me. it will start small.

if you want to make a good jumper do this

when [up arrow v] key pressed
repeat (10)
 change x by (5)
end

Fixed.
And that will only make it go up-- no, wait, it would go sideways! You're getting X and Y confused.  tongue

Here is a better jumping script (if you're trying to make a game.):

when gf clicked
forever
 if <key [up arrow v] pressed?>
  if <touching [ground v]?>
   repeat (20)//At least I think it should be 20...
    change [yv v] by (0.5)//I think it's 0.5...
   end
   repeat (20)
   change [yv v] by (-0.5)
   end
 end
end
end
end



When gf clicked
forever
  change y by (yv)
EDIT:There. Now it's a better script (and it does change y position now!) I was going to put the "forever change y by yv", but I forgot.  tongue

I just wanted to point out that your script will only move a sprite upwards, and not back down. Other than that, nice script!

Last edited by ErnieParke (2012-09-24 18:23:02)


http://i46.tinypic.com/35ismmc.png

Offline

 

#13 2012-09-24 18:57:27

awesomeness321
Scratcher
Registered: 2012-08-10
Posts: 100+

Re: Scratch Tips and Tricks

ErnieParke wrote:

awesomeness321 wrote:

RoboNeo9 wrote:

here is a list of tips and tricks that will help you in scratch. if you know any others please tell me. it will start small.

if you want to make a good jumper do this

when [up arrow v] key pressed
repeat (10)
 change x by (5)
end

Fixed.
And that will only make it go up-- no, wait, it would go sideways! You're getting X and Y confused.  tongue

Here is a better jumping script (if you're trying to make a game.):

when gf clicked
forever
 if <key [up arrow v] pressed?>
  if <touching [ground v]?>
   repeat (20)//At least I think it should be 20...
    change [yv v] by (0.5)//I think it's 0.5...
   end
   repeat (20)//Did you notice this part, ErnieParke?
   change [yv v] by (-0.5)
   end
 end
end
end
end



When gf clicked
forever
  change y by (yv)
EDIT:There. Now it's a better script (and it does change y position now!) I was going to put the "forever change y by yv", but I forgot.  tongue

I just wanted to point out that your script will only move a sprite upwards, and not back down. Other than that, nice script!

Actually, it makes it go up by 0.5 20 times, then it goes down an equal amount the same number of times.


My newest project:http://blocks.scratchr.org/API.php?user=awesomeness321&amp;action=projects&amp;type=newest&amp;return=image&amp;num=1Color:#30F9A5 I am currently http://blocks.scratchr.org/API.php?user=awesomeness321&amp;action=onlineStatus&amp;type=text

Offline

 

#14 2012-09-24 20:36:08

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Scratch Tips and Tricks

awesomeness321 wrote:

ErnieParke wrote:

awesomeness321 wrote:

Fixed.
And that will only make it go up-- no, wait, it would go sideways! You're getting X and Y confused.  tongue

Here is a better jumping script (if you're trying to make a game.):

when gf clicked
forever
 if <key [up arrow v] pressed?>
  if <touching [ground v]?>
   repeat (20)//At least I think it should be 20...
    change [yv v] by (0.5)//I think it's 0.5...
   end
   repeat (20)//Did you notice this part, ErnieParke? 
   change [yv v] by (-0.5)//Yes, I had.
   end
 end
end
end
end



When gf clicked
forever
  change y by (yv)
EDIT:There. Now it's a better script (and it does change y position now!) I was going to put the "forever change y by yv", but I forgot.  tongue

I just wanted to point out that your script will only move a sprite upwards, and not back down. Other than that, nice script!

Actually, it makes it go up by 0.5 20 times, then it goes down an equal amount the same number of times.

No it doesn't. Your scripts increase yv to 10, then it decrease yv to 0 and yv never goes negative, so I don't see how you get the sprite to move down if yv never goes negative.

Last edited by ErnieParke (2012-09-24 20:36:54)


http://i46.tinypic.com/35ismmc.png

Offline

 

#15 2012-09-24 20:51:48

Molybdenum
Scratcher
Registered: 2012-06-17
Posts: 1000+

Re: Scratch Tips and Tricks

ErnieParke wrote:

awesomeness321 wrote:

ErnieParke wrote:


I just wanted to point out that your script will only move a sprite upwards, and not back down. Other than that, nice script!

Actually, it makes it go up by 0.5 20 times, then it goes down an equal amount the same number of times.

No it doesn't. Your scripts increase yv to 10, then it decrease yv to 0 and yv never goes negative, so I don't see how you get the sprite to move down if yv never goes negative.

Yes. Its basic (integration) calculus.


"The Enrichment Center is required to remind you that you will be baked, and then there will be cake."
(|Balls and Platforms: Stay on!|) (|NaOS-H: An operating system... Or is it?|)

Offline

 

#16 2012-09-25 16:50:44

awesomeness321
Scratcher
Registered: 2012-08-10
Posts: 100+

Re: Scratch Tips and Tricks

ErnieParke wrote:

awesomeness321 wrote:

ErnieParke wrote:

I just wanted to point out that your script will only move a sprite upwards, and not back down. Other than that, nice script!

Actually, it makes it go up by 0.5 20 times, then it goes down an equal amount the same number of times.

No it doesn't. Your scripts increase yv to 10, then it decrease yv to 0 and yv never goes negative, so I don't see how you get the sprite to move down if yv never goes negative.

Ok, wait, let me fix that...


My newest project:http://blocks.scratchr.org/API.php?user=awesomeness321&amp;action=projects&amp;type=newest&amp;return=image&amp;num=1Color:#30F9A5 I am currently http://blocks.scratchr.org/API.php?user=awesomeness321&amp;action=onlineStatus&amp;type=text

Offline

 

#17 2012-09-25 17:13:18

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Scratch Tips and Tricks

awesomeness321 wrote:

RoboNeo9 wrote:

here is a list of tips and tricks that will help you in scratch. if you know any others please tell me. it will start small.

if you want to make a good jumper do this

when [up arrow v] key pressed
repeat (10)
 change x by (5)
end

Fixed.
And that will only make it go up-- no, wait, it would go sideways! You're getting X and Y confused.  tongue

Here is a better jumping script (if you're trying to make a game.):

when gf clicked
set [yv v] to (0)
forever
 if <key [up arrow v] pressed?>
  if <touching [ground v]?>
   repeat (20)//At least I think it should be 20...
    change [yv v] by (0.5)//I think it's 0.5...
   end
   set [yv v] to (0)//Added, so it can go down. Satisfied?
   repeat (20)//Almost.
   change [yv v] by (-0.5)
   end
 end
end
end
end



When gf clicked
forever
  change y by (yv)
EDIT:There. Now it's a better script (and it does change y position now!) I was going to put the "forever change y by yv", but I forgot.  tongue

I just saw another flaw. After jumping once, yv gets set to -10 and never gets reset to 0, so your sprite will float downwards for the rest of its life, which is a very sad situation. Falling forever doesn't sound very appeasing.  tongue

Last edited by ErnieParke (2012-09-25 19:05:05)


http://i46.tinypic.com/35ismmc.png

Offline

 

#18 2012-09-25 19:54:40

GoldTube
New Scratcher
Registered: 2012-08-07
Posts: 83

Re: Scratch Tips and Tricks

Nice! I like it, but it only goes up...

Offline

 

Board footer