Pages: 1
Topic closed
So my buddy and I are trying to figure out how to get a sprite from going through a platform and cant get it to work right... We can jump onto a platform but always walk through it... whats some code to make us not be able to? The touching [sprite] commands dont seem to work....
Offline
optyks wrote:
So my buddy and I are trying to figure out how to get a sprite from going through a platform and cant get it to work right... We can jump onto a platform but always walk through it... whats some code to make us not be able to? The touching [sprite] commands dont seem to work....
If you're not using velocity:
When flag clicked
Forever
if <not <touching [color (or your platform)]>
Change y by [-1 (experiment with this number)]
End if
End forever
If using velocity:
When flag clicked
Forever
if <not <touching [color (or your platform)]>
Set [yVelocity] to [0]
End if
End forever
Try those .
Offline
Try My games, <a href='http://scratch.mit.edu/projects/XX11Games/1316875'><img src='http://scratch.mit.edu/static/projects/XX11Games/1316875_med.png' width='425' height='319' alt='Scratch Project'></a>
<a href='http://scratch.mit.edu/projects/XX11Games/1316853'><img src='http://scratch.mit.edu/static/projects/XX11Games/1316853_med.png' width='425' height='319' alt='Scratch Project'></a>
Offline
see this
http://scratch.mit.edu/projects/fireball123/940816
Very helpful!
Offline
optyks wrote:
So my buddy and I are trying to figure out how to get a sprite from going through a platform and cant get it to work right... We can jump onto a platform but always walk through it... whats some code to make us not be able to? The touching [sprite] commands dont seem to work....
what you could try is put a color on the front of the character, try to put it on the middle on the front. that will be your sensing, you can make it a similar color as the sprite so it blends in. then add a: <if <color of senser touching color:(of platforms)?>
move minus speed of movement.
but when you program the arrow keys, make sure you point in the direction that it moves, or else it will go backwards in only 1 direction. hope that helps
Offline
Ok im trying to make a boss fight where pacman shoots lasers from his eyes and if they hit the ghost sprite he loses 10 out of 500 life. I'm using glide for the lasers and the glide stops when it gets on top of the ghost for 0.01 seconds then moves again. Now, the thing is the if touching color of ghost or if touching ghost sprite won't respond! I've tried everything I can think of! Suggestions would be greatly appreciated. Thanks
Offline
I made this for someone else, but you can use it too if you credit me . http://scratch.mit.edu/projects/kayybee/1337050
Offline
Topic closed
Pages: 1