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

#1 2012-09-30 23:22:42

brandon236
New Scratcher
Registered: 2012-09-19
Posts: 5

How do I make a solid ceiling

So I made this jump script and I was wondering how do I make a ceiling that when I'm jumping and I touch it I stop moving up and I move down.
Here's my jumping script

when [up arrow] key pressed
repeat [10]
change y by [10]
wait [0.25] secs
repeat [10]
change y by [-10]

Offline

 

#2 2012-09-30 23:33:51

brandon236
New Scratcher
Registered: 2012-09-19
Posts: 5

Re: How do I make a solid ceiling

I made a slight error in the jump script

when [up arrow] key pressed
repeat [10]
change y by [10]
end
wait [0.25] secs
repeat [10]
change y by [-10]

Offline

 

#3 2012-10-01 17:05:59

Prestige
Scratcher
Registered: 2008-12-15
Posts: 100+

Re: How do I make a solid ceiling

Using a very similar script to yours:

when [up arrow] key is pressed
set [counter v] to (1)
repeat until <<(counter) = (10)> or <touching colour [ceiling color]?>>
change y by [10]
change [counter v] by (1)
end 
wait [0.25] secs
repeat (counter)
change y by [-10]
end
Not saying this is the best way but will change your scripts by the least amount possible while achieving the desired effect  smile

Last edited by Prestige (2012-10-01 17:06:38)


"Don't insult someone until you've walked a mile in their shoes. That way, if they don't like what you have to say, you'll be a mile away and still have their shoes  smile  "

Offline

 

#4 2012-10-01 17:08:17

dvd4
Scratcher
Registered: 2010-06-30
Posts: 1000+

Re: How do I make a solid ceiling

Prestige wrote:

Using a very similar script to yours:

when [up v] key pressed
set [counter v] to (1)
repeat until <<(counter) = (10)> or <touching [ceiling color v]?>>
change y by [10]
change [counter v] by (1)
end 
wait [0.25] secs
repeat (counter)
change y by [-10]
end
Not saying this is the best way but will change your scripts by the least amount possible while achieving the desired effect  smile


I made a mod  big_smile  It's called blook!
http://i49.tinypic.com/16ia63p.png

Offline

 

#5 2012-10-03 08:57:01

Rsrilaya
Scratcher
Registered: 2012-09-22
Posts: 12

Re: How do I make a solid ceiling

So simple........
Use [scratchblocks]
when gf clicked
if <touching edge>>
change y by [-3]

Offline

 

#6 2012-10-03 09:29:04

Gravitation
New Scratcher
Registered: 2012-09-26
Posts: 500+

Re: How do I make a solid ceiling

Rsrilaya wrote:

So simple........
Use [scratchblocks]
when gf clicked
if <touching edge>>
change y by [-3]

Actually, that wouldn't work because if you go to the left/right edge you'll go down, and you won't be able to stand on the bottom edge.

Offline

 

#7 2012-10-03 10:57:07

Is_It_On_Yet
New Scratcher
Registered: 2012-10-03
Posts: 1

Re: How do I make a solid ceiling

If you need help, comment on one of my games to say so and I will do my very best to download your game and fix the bugs or help with any problems I can. If I can't do it, I will love your game to say sorry, but I will probably love it even if I can fix it because some things people come up with on scratch take my breat away!

Offline

 

Board footer