Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » I need a jumping script!
- lilhoginpitt
- Scratcher
100+ posts
I need a jumping script!
Hey guys! I need a jumping script with NO variables for Roundie, part of the Roundie series, which is in the Shapie Series. Can anybody possibly help me?
Last edited by lilhoginpitt (Dec. 22, 2013 18:26:59)
I do Scratch as a hobby. Axolotls and Bill 5ever. I know they are connected but it is just a coincidence I love both of them!
- Blackswift
- Scratcher
47 posts
I need a jumping script!
I don't really think there is a jumping script without jumping. I can try to make a general platforming base on @Blackswift-Test if you want. It won't look very professional, but it'll work. Whaddya think? (p.s. I'm kinda doing something really quick. I'm almost done, but I won't start on it for… 15 or 20 minutes? It won't take me very long though.)
- lilhoginpitt
- Scratcher
100+ posts
I need a jumping script!
Do you mean no jumping script without a variable? I don't really think there is a jumping script without jumping. I can try to make a general platforming base on @Blackswift-Test if you want. It won't look very professional, but it'll work. Whaddya think? (p.s. I'm kinda doing something really quick. I'm almost done, but I won't start on it for… 15 or 20 minutes? It won't take me very long though.)
I do Scratch as a hobby. Axolotls and Bill 5ever. I know they are connected but it is just a coincidence I love both of them!
- WithOnions
- Scratcher
27 posts
I need a jumping script!
A no-variable jumping script. I've used one, and it's used in my Basic Platformer Engine project.
It basically uses 2 separate scripts. One is the gravity - it always pulls the character down. In a forever loop, put ‘repeat until touching color x’, with X being the color of the ground. Inside this repeating script, put “change y by 5” or “change y by 6”. It depends on how fast you want the character to fall.
The other one is the jumping script. In a forever loop, insert an ‘if key up arrow pressed AND touching color x (color of the floor)’ block. Inside, put a ‘repeat’ block by 10 or so. Once again, it depends. Then put ‘change y by x’, X being any reasonable number, the amount of y values the character should jump.
It should end up looking something like this: http://i.imgur.com/e0TBBlz.png
Hopefully it works.
It basically uses 2 separate scripts. One is the gravity - it always pulls the character down. In a forever loop, put ‘repeat until touching color x’, with X being the color of the ground. Inside this repeating script, put “change y by 5” or “change y by 6”. It depends on how fast you want the character to fall.
The other one is the jumping script. In a forever loop, insert an ‘if key up arrow pressed AND touching color x (color of the floor)’ block. Inside, put a ‘repeat’ block by 10 or so. Once again, it depends. Then put ‘change y by x’, X being any reasonable number, the amount of y values the character should jump.
It should end up looking something like this: http://i.imgur.com/e0TBBlz.png
Hopefully it works.
“Life is real, life is earnest, and the grave is not its goal.”
- Henry Wadsworth Longfellow
- lilhoginpitt
- Scratcher
100+ posts
I need a jumping script!
A no-variable jumping script. I've used one, and it's used in my Basic Platformer Engine project.
It basically uses 2 separate scripts. One is the gravity - it always pulls the character down. In a forever loop, put ‘repeat until touching color x’, with X being the color of the ground. Inside this repeating script, put “change y by 5” or “change y by 6”. It depends on how fast you want the character to fall.
The other one is the jumping script. In a forever loop, insert an ‘if key up arrow pressed AND touching color x (color of the floor)’ block. Inside, put a ‘repeat’ block by 10 or so. Once again, it depends. Then put ‘change y by x’, X being any reasonable number, the amount of y values the character should jump.
It should end up looking something like this: http://i.imgur.com/e0TBBlz.png
Hopefully it works.
I will try that!
I do Scratch as a hobby. Axolotls and Bill 5ever. I know they are connected but it is just a coincidence I love both of them!
- Blackswift
- Scratcher
47 posts
I need a jumping script!
Do you mean no jumping script without a variable? I don't really think there is a jumping script without jumping. I can try to make a general platforming base on @Blackswift-Test if you want. It won't look very professional, but it'll work. Whaddya think? (p.s. I'm kinda doing something really quick. I'm almost done, but I won't start on it for… 15 or 20 minutes? It won't take me very long though.)
Yeah, that's what I meant, but WithOnions may be right.
- lilhoginpitt
- Scratcher
100+ posts
I need a jumping script!
Do you mean no jumping script without a variable? I don't really think there is a jumping script without jumping. I can try to make a general platforming base on @Blackswift-Test if you want. It won't look very professional, but it'll work. Whaddya think? (p.s. I'm kinda doing something really quick. I'm almost done, but I won't start on it for… 15 or 20 minutes? It won't take me very long though.)
Yeah, that's what I meant, but WithOnions may be right.
I am trying the code WithOnions made.
I do Scratch as a hobby. Axolotls and Bill 5ever. I know they are connected but it is just a coincidence I love both of them!
- lilhoginpitt
- Scratcher
100+ posts
I need a jumping script!
A no-variable jumping script. I've used one, and it's used in my Basic Platformer Engine project.
It basically uses 2 separate scripts. One is the gravity - it always pulls the character down. In a forever loop, put ‘repeat until touching color x’, with X being the color of the ground. Inside this repeating script, put “change y by 5” or “change y by 6”. It depends on how fast you want the character to fall.
The other one is the jumping script. In a forever loop, insert an ‘if key up arrow pressed AND touching color x (color of the floor)’ block. Inside, put a ‘repeat’ block by 10 or so. Once again, it depends. Then put ‘change y by x’, X being any reasonable number, the amount of y values the character should jump.
It should end up looking something like this: http://i.imgur.com/e0TBBlz.png
Hopefully it works.
The coding works! Thanks a lot!
I do Scratch as a hobby. Axolotls and Bill 5ever. I know they are connected but it is just a coincidence I love both of them!
- WithOnions
- Scratcher
27 posts
I need a jumping script!
A no-variable jumping script. I've used one, and it's used in my Basic Platformer Engine project.
It basically uses 2 separate scripts. One is the gravity - it always pulls the character down. In a forever loop, put ‘repeat until touching color x’, with X being the color of the ground. Inside this repeating script, put “change y by 5” or “change y by 6”. It depends on how fast you want the character to fall.
The other one is the jumping script. In a forever loop, insert an ‘if key up arrow pressed AND touching color x (color of the floor)’ block. Inside, put a ‘repeat’ block by 10 or so. Once again, it depends. Then put ‘change y by x’, X being any reasonable number, the amount of y values the character should jump.
It should end up looking something like this: http://i.imgur.com/e0TBBlz.png
Hopefully it works.
The coding works! Thanks a lot!
No problem!
“Life is real, life is earnest, and the grave is not its goal.”
- Henry Wadsworth Longfellow
- lilhoginpitt
- Scratcher
100+ posts
I need a jumping script!
A no-variable jumping script. I've used one, and it's used in my Basic Platformer Engine project.
It basically uses 2 separate scripts. One is the gravity - it always pulls the character down. In a forever loop, put ‘repeat until touching color x’, with X being the color of the ground. Inside this repeating script, put “change y by 5” or “change y by 6”. It depends on how fast you want the character to fall.
The other one is the jumping script. In a forever loop, insert an ‘if key up arrow pressed AND touching color x (color of the floor)’ block. Inside, put a ‘repeat’ block by 10 or so. Once again, it depends. Then put ‘change y by x’, X being any reasonable number, the amount of y values the character should jump.
It should end up looking something like this: http://i.imgur.com/e0TBBlz.png
Hopefully it works.
The coding works! Thanks a lot!
No problem!
I will tell you when it is out!
I do Scratch as a hobby. Axolotls and Bill 5ever. I know they are connected but it is just a coincidence I love both of them!
- JimmleCentral
- Scratcher
13 posts
I need a jumping script!
when [ Up Arrow] key pressed
change y by (Height)
wait (Air Time) secs
change y by (-Height)
- lilhoginpitt
- Scratcher
100+ posts
I need a jumping script!
when [ Up Arrow] key pressed
change y by (Height)
wait (Air Time) secs
change y by (-Height)
I am done..
I do Scratch as a hobby. Axolotls and Bill 5ever. I know they are connected but it is just a coincidence I love both of them!
- picopaper
- Scratcher
500+ posts
I need a jumping script!
A no-variable jumping script was the first I used; it looks something like this:
Hope this helps!
when green flag clickedYou can change the numbers around as needed.
forever
repeat until <touching color [black]?>
change y by (-5)
end
if <key [up arrow v] pressed?> then
repeat (10)
change y by (5)
end
end
end
Hope this helps!
Last edited by picopaper (Dec. 23, 2013 21:54:45)
if <(platypus) = [platypus]> then
set [platypus v] to [platypus]
Pigs with Jetpacks! (a game of porcine combat)
What is with all these kumquat sig– *gulp*
- supero
- Scratcher
11 posts
I need a jumping script!
Why don't you want variables?
"I always finish projects last in school; not because I had no ideas, but because I had too many." -Me.
- Discussion Forums
- » Help with Scripts
- » I need a jumping script!