so I am slowly getting accustomed to scratch and now I am planning to create this maze game and I need help making it work. I will be trying to work on my own version but it would be nice if someone can also help me make this work
http://scratch.mit.edu/projects/josh111111/2029777
I want to make sure the following happens
1. If the cat goes touches the walls of the maze, the game is over and the user failed. Indicate this by having the cat say "Game over!" and stopping the program.
2.if the cat reaches the goal of the cheesy puffs, the game is over and the user
succeeded. Indicate this by having the cat say "You win!" and stopping the program.
3. Movement of the cat should match the arrow keys. Handle the event of the left arrow being pressed by moving the cat right (i.e., the cat's X coordinate should get larger). Handle the event of the down arrow being pressed by moving the cat down (i.e., the cat's Y coordinate should get smaller).
4. I also want to end the game properly when the cat touches the goal or the walls of the maze.
Offline
Normally the right arrow key moves the player right, but I guess if you want to make it tricky...those other scripts are pretty easy:
When Flag Clicked
go to: start location
forever
if <touching wall> OR <touching color [wall color]>
say "You Lost!" for 2 seconds
Stop All
if <touching cheese-puffs>
say "You Win!" for 2 seconds
Stop All
[controls can then go here]
Offline
<when green flag clicked>
<forever>
<if><key[ up ]pressed?>
<change y by( 3 )>
<end>
<if><key[ down ]pressed?>
<change y by( -3 )>
<end>
<if><key[ left ]pressed?>
<change x by( 3 )>
<end>
<if><key[ right ]pressed?>
<change x by( -3 )>
<end>
<if><touching color[ red ]>
<broadcast[ game over ]and wait c>
<stop all>
<end>
<if><touching[ cheesesy puffs ]>
<broadcast[ winner ]and wait c>
<stop all>
<end>
<end>
Last edited by MoreGamesNow (2011-09-15 16:36:14)
Offline