i am making a snake-type game, and am using this script for the pen:
<when I receive[ Start ]
<forever>
<pen down>
<wait( <{ Dificulty }> )secsc>
<clear>
<if><( <{ Lose }> <=> 1 )>
<stop script>
<end>
<end>
And this script for losing:
<when green flag clicked>
<reset timer>
<broadcast[ start ]
<show>
<set{ Lose }to( 0
<forever>
<if><touching color[ Pen Color ]
<set{ Lose }to( 1
<hide>
<clear>
<end>
<end>
Last edited by AlanProjects (2008-07-23 19:42:00)
Offline
??? What's the question? And what are the sprites again?
Offline
Arrjgsdsjjdscjhcv. How to make a snake(classic arcade game) style game that makes it so that if you run into the pen, you lose.
Offline
Is it starting or not starting? Cause it already is touching that color to begin with
Offline
Exactly. i know the pen is always touching the sprite, but i can't think of an alternative it is getting annoying!
Offline
It starts fine, you just instantly lose arghakdwjhkqwjghdcjqcdjkqwbc
Offline
Its because when you draw the line with your pen you are going over it. I would suggest making the center point of the snake a few mm's from the tail of the snake so it doesn't run into it. Or sense so that when the head (Different color than body) is touching the pen color it does that.
Offline
Nope. doesn't work.
Offline
AlanProjects wrote:
Nope. doesn't work.
Make it 2 sprites. You know, snake is a very hard game to make on Scratch FYI
Offline
Yeah, so? it isn't really snake, more like a game where, in an ideal world, you choose your difficulty setting on a slider, which makes the pen go down for "diffficulty" seconds, and then clear. If you run into you're pen trail, you lose.
Last edited by AlanProjects (2008-07-23 20:52:04)
Offline
AlanProjects wrote:
Yeah, so? it isn't really snake, more like a game where, in an ideal world, you choose your difficulty setting on a slider, which makes the pen go down for "diffficulty" seconds, and then clear. If you run into you're pen trail, you lose.
Anything like it is extremely difficult in Scratch. All I can say is good luck
Offline
Bluestribute wrote:
AlanProjects wrote:
Yeah, so? it isn't really snake, more like a game where, in an ideal world, you choose your difficulty setting on a slider, which makes the pen go down for "diffficulty" seconds, and then clear. If you run into you're pen trail, you lose.
Anything like it is extremely difficult in Scratch. All I can say is good luck
..........................................................................
Offline
AlanProjects wrote:
Yeah, so? it isn't really snake, more like a game where, in an ideal world, you choose your difficulty setting on a slider, which makes the pen go down for "diffficulty" seconds, and then clear. If you run into you're pen trail, you lose.
Sound interesting! The tail would only be there from time to time since the Clear command would wipe it out...still, it sounds like it would be fun. You could make the nose of the sprite a different color and then test for if that color is touching the pen color...I wonder if that would work? Or...you could use a second sprite that has a rotation center that is actually on the sprite. The pen would appear at the rotation center but the sprite would not be touching the pen color.
Offline
Paddle2See wrote:
AlanProjects wrote:
Yeah, so? it isn't really snake, more like a game where, in an ideal world, you choose your difficulty setting on a slider, which makes the pen go down for "diffficulty" seconds, and then clear. If you run into you're pen trail, you lose.
Sound interesting! The tail would only be there from time to time since the Clear command would wipe it out...still, it sounds like it would be fun. Are you going to make it?
I don't know. i'm running into problems. because when the pen is down, it always touches the sprite you instantly lose. i could post to show you, if you want. Right now i'm working on an annoying scroller.
Offline
I was making an edit when you grabbed my quote...please look back at my original post...it has some ideas that might work.
Offline
oh, i think those are great ideas! i'll test them. I like the nose one most.
Offline
YEAH!!!!!!! IT FINALLY WORKS! I'll POST IT SOON!!!!
Offline