Discuss Scratch

scratchcat303
New to Scratch
6 posts

Double Jump?

How do I double jump without messing up this script
when [up arrow v] key pressed
if <touching color [#ff0088] ?> then
repeat (10)
change y by (9)

end


end
scratchcat303
New to Scratch
6 posts

Double Jump?

also how do I make a solid wall with this script
when green flag clicked
forever

if <key [right arrow v] pressed?> then
move (2) steps
point in direction (-90 v)



end

end
RPFluffy
Scratcher
1000+ posts

Double Jump?

scratchcat303 wrote:

How do I double jump without messing up this script
when [up arrow v] key pressed
if <touching color [#ff0088] ?> then
repeat (10)
change y by (9)

end


end

I'm not sure but I know this:

scratchcat303 wrote:

also how do I make a solid wall with this script
when green flag clicked
forever

if <key [right arrow v] pressed?> then
move (2) steps
point in direction (-90 v)



end

end

Try this:

when green flag clicked
forever
if <key [right arrow v] pressed?> then
move (2) steps
point in direction (90 v)
if <touching [wall v] ?> then
point in direction (opposite v)
repeat until <not <touching [wall v] ?>>
move (2) steps
end

end



end

Nothing Is EVER 100%, that is just an assumption.















Some important links: Here and here or need help click Here. Eats followers, Loves helping people.
My “..” and “…” are not spelling mistakes, it means that they are ways of telling someone that I can continue more about it and that the sentence isn't ended the best way. I like putting new indents and lines so I can split up what I am talking about.




































Some important links: Here and here or need help click Here. Eats followers, Loves helping people. Check this MMO out! Kiwi = Support WHAT THAT'S IMPOSSIBLE: Through the drop down ;)
if <> :: control cstart

else :: control
end
scratchcat303
New to Scratch
6 posts

Double Jump?

RPFluffy wrote:

scratchcat303 wrote:

How do I double jump without messing up this script
when [up arrow v] key pressed
if <touching color [#ff0088] ?> then
repeat (10)
change y by (9)

end


end

I'm not sure but I know this:

scratchcat303 wrote:

also how do I make a solid wall with this script
when green flag clicked
forever

if <key [right arrow v] pressed?> then
move (2) steps
point in direction (-90 v)



end

end

Try this:

when green flag clicked
forever
if <key [right arrow v] pressed?> then
move (2) steps
point in direction (90 v)
if <touching [wall v] ?> then
point in direction (opposite v)
repeat until <not <touching [wall v] ?>>
move (2) steps
end

end



end
can you do it with out pointing a different dirrection
RPFluffy
Scratcher
1000+ posts

Double Jump?

Well you see its for walls and I'll try to make a better version for ground sensing:

Hope it helps

when green flag clicked
forever
if <key [right arrow v] pressed?> then
point in direction (90 v)
move (2) steps
if <touching [Ground v] ?> then
repeat until <not <touching [Ground v] ?>>
point in direction (0 v)
move (1) steps
end

end



end

Last edited by RPFluffy (Aug. 31, 2014 13:17:52)


Nothing Is EVER 100%, that is just an assumption.















Some important links: Here and here or need help click Here. Eats followers, Loves helping people.
My “..” and “…” are not spelling mistakes, it means that they are ways of telling someone that I can continue more about it and that the sentence isn't ended the best way. I like putting new indents and lines so I can split up what I am talking about.




































Some important links: Here and here or need help click Here. Eats followers, Loves helping people. Check this MMO out! Kiwi = Support WHAT THAT'S IMPOSSIBLE: Through the drop down ;)
if <> :: control cstart

else :: control
end
scratchcat303
New to Scratch
6 posts

Double Jump?

RPFluffy wrote:

Well you see its for walls and I'll try to make a better version for ground sensing:

Hope it helps

when green flag clicked
forever
if <key [right arrow v] pressed?> then
point in direction (90 v)
move (2) steps
if <touching [Ground v] ?> then
repeat until <not <touching [Ground v] ?>>
point in direction (0 v)
move (1) steps
end

end



end
no I mean theres still walls but they are part of the ground
MegaApuTurkUltra
Scratcher
1000+ posts

Double Jump?

Double jumping is easy
When gf clicked
Set [jump count v] to (0)
Forever
If<touching [ground v]?>
set [jump count v] to (0)
if<key [w v] pressed?>
set [jump count v] to (1)
jump::custom
End
Else
If<<key [w v] pressed?> and <(jump count) < (2)>>
change [jump count v] by (1)
jump::custom
End
End
Of course you may also want a slight delay to make sure people can't do a second jump immediately.

HTH

$(".box-head")[0].textContent = "committing AT crimes since $whenever"
RPFluffy
Scratcher
1000+ posts

Double Jump?

scratchcat303 wrote:

RPFluffy wrote:

Well you see its for walls and I'll try to make a better version for ground sensing:

Hope it helps

when green flag clicked
forever
if <key [right arrow v] pressed?> then
point in direction (90 v)
move (2) steps
if <touching [Ground v] ?> then
repeat until <not <touching [Ground v] ?>>
point in direction (0 v)
move (1) steps
end

end



end
no I mean theres still walls but they are part of the ground

Just have it sense the color of both walls and ground, like so:

when green flag clicked
forever
if <key [right arrow v] pressed?> then
point in direction (90 v)
move (2) steps
if <<touching [Ground v] ?> and < touching [walls v] ?>> then
repeat until <not <<touching [Ground v] ?> and <touching [Walls v] ?>>>
point in direction (0 v)
move (1) steps
end

end
end
if <key [left arrow v] pressed?> then
point in direction (-90 v)
move (2) steps
if <<touching [Ground v] ?> and < touching [walls v] ?>> then
repeat until <not <<touching [Ground v] ?> and <touching [Walls v] ?>>>
point in direction (0 v)
move (1) steps
end

end


end

Last edited by RPFluffy (Sept. 16, 2014 20:36:54)


Nothing Is EVER 100%, that is just an assumption.















Some important links: Here and here or need help click Here. Eats followers, Loves helping people.
My “..” and “…” are not spelling mistakes, it means that they are ways of telling someone that I can continue more about it and that the sentence isn't ended the best way. I like putting new indents and lines so I can split up what I am talking about.




































Some important links: Here and here or need help click Here. Eats followers, Loves helping people. Check this MMO out! Kiwi = Support WHAT THAT'S IMPOSSIBLE: Through the drop down ;)
if <> :: control cstart

else :: control
end

Powered by DjangoBB