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

#1 2008-06-07 11:33:11

keroro645
Scratcher
Registered: 2008-06-07
Posts: 1000+

how do you make a sprite solid

Im making a side scroller and i cant get to where the sprite would stand on ground

Offline

 

#2 2008-06-07 11:34:39

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: how do you make a sprite solid

????? Please be more specific, because if I understand, I probably can help


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#3 2008-06-07 11:39:06

keroro645
Scratcher
Registered: 2008-06-07
Posts: 1000+

Re: how do you make a sprite solid

i made a stick man sprite and i used archmages tutorial on making a side scroller. i want it so that the stickman sprite would stand onthe ground,but all it does is just fall through the ground.

Offline

 

#4 2008-06-07 11:43:00

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: how do you make a sprite solid

[blocks]<when green flag clicked>[/blocks]
[blocks]<forever>[/blocks]
[blocks]<if><touching color[ Your color (or substitute with touching sprite)[/blocks]
[blocks]<change y by( 1[/blocks]
[blocks]<end>[/blocks]
[blocks]<if><<  <not> <touching color[ Your color >>[/blocks]
[blocks]<change y by( -1[/blocks]
[blocks]<end>[/blocks]

Is this what you mean?


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#5 2008-06-07 11:48:43

keroro645
Scratcher
Registered: 2008-06-07
Posts: 1000+

Re: how do you make a sprite solid

That made the ground float over the stickman

Offline

 

#6 2008-06-07 11:53:30

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: how do you make a sprite solid

Put that script in the stickman


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#7 2008-06-07 12:00:39

keroro645
Scratcher
Registered: 2008-06-07
Posts: 1000+

Re: how do you make a sprite solid

it works now,thanks

Offline

 

#8 2008-06-07 12:02:11

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: how do you make a sprite solid

keroro645 wrote:

it works now,thanks

big_smile  your welcome, though it's kinda funny because we misread each other, how I'm pretty sure you said sprite and you put it on the ground (which I didn't clarify were it goes)


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#9 2008-06-07 13:01:51

dingdong
Scratcher
Registered: 2007-08-09
Posts: 1000+

Re: how do you make a sprite solid

actually there's a better way

(for this you'll need to have a layer of an extremely dark gray at the feet
<color (black or most common color) is touching (ground color)
then change Y by 5 (this allows you to climb up steep slopes without bouncing constantly)
<if not touching color (ground color)
then set Yspeed to 0
repeat until touching color (ground color)
change Y by Yspeed
change Yspeed by -0.2
_____________________
set Yspeed to 0

it works a little better and has gravity


http://img851.imageshack.us/img851/2829/superanbanner.png
click the image for my music

Offline

 

#10 2008-06-07 13:03:36

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: how do you make a sprite solid

dingdong wrote:

actually there's a better way

(for this you'll need to have a layer of an extremely dark gray at the feet
<color (black or most common color) is touching (ground color)
then change Y by 5 (this allows you to climb up steep slopes without bouncing constantly)
<if not touching color (ground color)
then set Yspeed to 0
repeat until touching color (ground color)
change Y by Yspeed
change Yspeed by -0.2
_____________________
set Yspeed to 0

it works a little better and has gravity

Actually (for my sake too), can you make that with the blocks? I've never really understood gravity in Scratch


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#11 2008-06-07 13:06:55

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: how do you make a sprite solid

Yspeed=variable

Offline

 

#12 2008-06-07 13:07:28

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: how do you make a sprite solid

coolstuff wrote:

Yspeed=variable

Well yeah, I know that. I just never get the numbers and why they work


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#13 2008-06-07 13:09:24

dingdong
Scratcher
Registered: 2007-08-09
Posts: 1000+

Re: how do you make a sprite solid

gravity is extremely simple

http://scratch.mit.edu/forums/viewtopic.php?id=6046#req_message
when green flag clicked
http://scratch.mit.edu/forums/viewtopic.php?id=6046#req_message
forever
http://scratch.mit.edu/forums/viewtopic.php?id=6046#req_message
if http://scratch.mit.edu/forums/viewtopic.php?id=6046#req_message
key up arrow pressed
http://scratch.mit.edu/forums/viewtopic.php?id=6046#req_message
set Yspeed to 6
http://scratch.mit.edu/forums/viewtopic.php?id=6046#req_message
change y by http://scratch.mit.edu/forums/viewtopic.php?id=6046#req_message
{Yspeed
http://scratch.mit.edu/forums/viewtopic.php?id=6046#req_message
repeat until http://scratch.mit.edu/forums/viewtopic.php?id=6046#req_message
touching color ground color
change y by http://scratch.mit.edu/forums/viewtopic.php?id=6046#req_message
{Yspeed
http://scratch.mit.edu/forums/viewtopic.php?id=6046#req_message
change Yspeed by -0.2
http://scratch.mit.edu/forums/viewtopic.php?id=6046#req_message
end
http://scratch.mit.edu/forums/viewtopic.php?id=6046#req_message
set Yspeed to 0


http://img851.imageshack.us/img851/2829/superanbanner.png
click the image for my music

Offline

 

#14 2008-06-07 13:10:25

dingdong
Scratcher
Registered: 2007-08-09
Posts: 1000+

Re: how do you make a sprite solid

agghh I can never use the stupid blocks


http://img851.imageshack.us/img851/2829/superanbanner.png
click the image for my music

Offline

 

#15 2008-06-07 13:14:24

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: how do you make a sprite solid

Let me try:

[blocks]<when green flag clicked>[/blocks]
[blocks]<forever>[/blocks]
[blocks]<if><key[ up arrow ]pressed?>[/blocks]
[blocks]<set{ Yspeed }to( 6[/blocks]
[blocks]<change y by( <{ Yspeed }>[/blocks]
[blocks]<repeat until><touching[ Ground[/blocks]
[blocks]<change y by( <{ Yspeed}>[/blocks]
[blocks]<change{ Yspeed }by( -0.2[/blocks]
[blocks]<end>[/blocks]
[blocks]<set{ Yspeed }to( 0[/blocks]

Last edited by Bluestribute (2008-06-07 13:56:07)


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#16 2008-06-07 13:22:57

Cyclone103
Scratcher
Registered: 2008-03-20
Posts: 500+

Re: how do you make a sprite solid

lol


All your base are belong to us

Offline

 

#17 2008-06-07 13:42:14

dingdong
Scratcher
Registered: 2007-08-09
Posts: 1000+

Re: how do you make a sprite solid

change Yspeed by -0.2


http://img851.imageshack.us/img851/2829/superanbanner.png
click the image for my music

Offline

 

Board footer