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

#1 2011-07-04 17:08:57

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Please Help

Okay I am making a game, sorta like Scratch Defenders but different. Okay, when I download another person's project, to see their scripts, I find many many people do x velocity and y velocity in moving left and right and up and down. I need help with that. The mathematical functions look so confusing and I have no idea what they do. So can somebody explain to me how to use the y velocity variable in Scratch for moving up without using those extra special mathematical functions? If so, I will be very grateful and give at least a love it on one project.  smile


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

#2 2011-07-06 00:12:38

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Please Help

Velocity is actually pretty simple, in concept.  smile  All you need is a velocity variable for each axis, which is increased or decreased based on key presses. Then you just change the x/y position by the corresponding velocity variable. A simple x velocity script might look like this:

Code:

When green flag clicked
Forever
    If <key right arrow pressed>
        Change x velocity by 2
    If <key left arrow pressed>
        Change x velocity by -2
    Change x by x velocity

You can add a lot to it, like adding friction that makes you slowly slow down, changing how quickly the velocity changes, and adding a limit to how fast you can go, but that's a basic velocity script. I hope that helps you understand!


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#3 2011-07-06 00:24:22

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Re: Please Help

Well thanks, I figured the problem out. I am just figuring out the rest of the game what to do in it. Can you go to a BIG PROJECT forum? I could use an expert scratcher like you.  smile


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

#4 2011-07-06 00:33:37

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Please Help

"BIG PROJECT" forum? What do you mean? Oh, and "Expert Scratcher"? boy, I'm flattered :P


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#5 2011-07-06 00:53:07

Gameseva
New Scratcher
Registered: 2011-06-24
Posts: 1

Re: Please Help

Im am making a game and i want my counter to just shop moving when it hits the red part 
i have
<when green flag clicked>
<forever if><touching color[blue
<move( -15 )steps>

but i dont want it to move backwards i just want it to not be able to go past that point.

Please help.

Offline

 

#6 2011-07-06 01:34:41

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Re: Please Help

Umm, this is about helping me but I guess I could help you? Okay you see on the top where there is a blue line and you can move it so it changes direction? Well there is an x position and y position. Check the x position. Then take out your script saying
When Flag clicked forever if touching blue then move -15 steps, no that will just make it move backwards! Take that script out. Then get a
When Flag clicked
forever
if sensing x position of Sprite number operators = the x position
then set x to x position of Sprite number and y position of sprite number.

Next time post your need for help in a different topic  wink .


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

#7 2011-07-06 01:40:14

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Re: Please Help

Harakou wrote:

"BIG PROJECT" forum? What do you mean? Oh, and "Expert Scratcher"? boy, I'm flattered :P

Oh, I mean is go to Collaboration (way bottom) and there should be a topic titled, 'Big Project'. I need some Scratchers who are very experienced with Scratch and can help out. I would like to have some help with

scrollx
designing
scripting for new places
and much more. So please go there.

Oh and for the experienced Scratchers? You are one! I am a newbie scratcher and probably have 0 skill at this programming software. I need your help and much others, can you tell your friends if they have been around Scratch for QUITE some time, and ask them to go to forums -->  way bottom of page -->  Collaboration --> Big Project. If you do I will be very grateful!


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

#8 2011-07-06 11:05:53

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Please Help

Thescratch3 wrote:

Harakou wrote:

"BIG PROJECT" forum? What do you mean? Oh, and "Expert Scratcher"? boy, I'm flattered :P

Oh, I mean is go to Collaboration (way bottom) and there should be a topic titled, 'Big Project'. I need some Scratchers who are very experienced with Scratch and can help out. I would like to have some help with

scrollx
designing
scripting for new places
and much more. So please go there.

Oh and for the experienced Scratchers? You are one! I am a newbie scratcher and probably have 0 skill at this programming software. I need your help and much others, can you tell your friends if they have been around Scratch for QUITE some time, and ask them to go to forums -->  way bottom of page -->  Collaboration --> Big Project. If you do I will be very grateful!

Oh, I see. I'll gladly help out in couple days once I get more time. (Long story)  smile

Last edited by Harakou (2011-07-06 11:32:54)


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#9 2011-09-03 21:56:15

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Re: Please Help

Harakou wrote:

Thescratch3 wrote:

Harakou wrote:

"BIG PROJECT" forum? What do you mean? Oh, and "Expert Scratcher"? boy, I'm flattered :P

Oh, I mean is go to Collaboration (way bottom) and there should be a topic titled, 'Big Project'. I need some Scratchers who are very experienced with Scratch and can help out. I would like to have some help with

scrollx
designing
scripting for new places
and much more. So please go there.

Oh and for the experienced Scratchers? You are one! I am a newbie scratcher and probably have 0 skill at this programming software. I need your help and much others, can you tell your friends if they have been around Scratch for QUITE some time, and ask them to go to forums -->  way bottom of page -->  Collaboration --> Big Project. If you do I will be very grateful!

Oh, I see. I'll gladly help out in couple days once I get more time. (Long story)  smile

XD a couple days?


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

#10 2011-09-03 22:06:32

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Please Help

Thescratch3 wrote:

Harakou wrote:

Thescratch3 wrote:


Oh, I mean is go to Collaboration (way bottom) and there should be a topic titled, 'Big Project'. I need some Scratchers who are very experienced with Scratch and can help out. I would like to have some help with

scrollx
designing
scripting for new places
and much more. So please go there.

Oh and for the experienced Scratchers? You are one! I am a newbie scratcher and probably have 0 skill at this programming software. I need your help and much others, can you tell your friends if they have been around Scratch for QUITE some time, and ask them to go to forums -->  way bottom of page -->  Collaboration --> Big Project. If you do I will be very grateful!

Oh, I see. I'll gladly help out in couple days once I get more time. (Long story)  smile

XD a couple days?

Oops. XD Sorry. I guess this died after you didn't respond. Is the thread you're talking about still up, or have you solved your problems?


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#11 2011-09-03 22:11:06

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Re: Please Help

Harakou wrote:

Thescratch3 wrote:

Harakou wrote:


Oh, I see. I'll gladly help out in couple days once I get more time. (Long story)  smile

XD a couple days?

Oops. XD Sorry. I guess this died after you didn't respond. Is the thread you're talking about still up, or have you solved your problems?

Oh no it was sort of like a joke. I was browsing through my old topics, I can maybe fix this problem, I am still not this professional, but I have improved greatly. To see check these two projects and look at the differences:

Good one: http://scratch.mit.edu/projects/Thescratch3/1997263

Old one: http://scratch.mit.edu/projects/Thescratch3/1873764


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

#12 2011-09-03 22:16:21

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Please Help

Thescratch3 wrote:

Harakou wrote:

Thescratch3 wrote:


XD a couple days?

Oops. XD Sorry. I guess this died after you didn't respond. Is the thread you're talking about still up, or have you solved your problems?

Oh no it was sort of like a joke. I was browsing through my old topics, I can maybe fix this problem, I am still not this professional, but I have improved greatly. To see check these two projects and look at the differences:

Good one: http://scratch.mit.edu/projects/Thescratch3/1997263

Old one: http://scratch.mit.edu/projects/Thescratch3/1873764

Wow, great improvement!


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#13 2011-09-03 22:21:32

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Re: Please Help

Harakou wrote:

Thescratch3 wrote:

Harakou wrote:


Oops. XD Sorry. I guess this died after you didn't respond. Is the thread you're talking about still up, or have you solved your problems?

Oh no it was sort of like a joke. I was browsing through my old topics, I can maybe fix this problem, I am still not this professional, but I have improved greatly. To see check these two projects and look at the differences:

Good one: http://scratch.mit.edu/projects/Thescratch3/1997263

Old one: http://scratch.mit.edu/projects/Thescratch3/1873764

Wow, great improvement!

smile  Thanks.


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

Board footer