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

#1 2008-01-04 20:21:16

pachipachi
Scratcher
Registered: 2008-01-04
Posts: 15

Help with game please.

Hello, I am 12 years old. I am making something very similiar to SnackaCat, a game created previously by Dthen, and I used the game's coding to help. I've already made the basics of the game: the cat is aimed with the mouse and spacebar is used to control, collecting the items, getting points, time limits, ect. I want to add some more things to my game, like the cat has to dodge people and other animals to get the item, but if it hits the people/animals it loses a life. How can I do that? Also how do you make a person/other animal move across the screen? Is there a way I can get the game to go a higher level, like level 2, 3, and so on? If so, how? And if you don't mind another question, I would like to know how to make a extra item that rarely comes on the screen that gives you more points than the normal items. I'm new to this so please explain what coding to put if you can. I want to make this game as good as it can get.  big_smile  I apreciatte your replies!
-Pachipachi

Offline

 

#2 2008-01-05 04:42:57

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Help with game please.

Good for you for trying to add new features to your game!  The way I learn how to add new features is I look for projects that have a feature that I like, then I download them and look at the code to figure out how they made the feature.  Then, I make a small project and try to build the feature myself, adding one small thing at a time, testing it again and again until it does what I want.

You have asked for help on a lot of different items:  let me address the Lives one and let others take on the rest of the list.  To add Lives to a project is pretty easy.  Define a variable called Lives that can be seen by all sprites.  Set it to the number you want to start with on a Green Flag script somewhere.  Then set up the poison objects that are going to take lives away.  The poison objects can be sprites or they can be specially colored items painted on the background, it all depends on how you want to sense them.  If they are sprites, you can simply add blocks to the poison sprites that say "If touching <your good guy sprite>,  change Lives by -1" .  If you are using specially colored items, you will need to add blocks to your good guy, something like "if touching <color of poison items>, change Lives by -1".  The last thing you might want is something to happen when you run out of lives.  This can be done with a set of blocks run off a Green Flag hat saying something like "wait until <Lives = 0>, say Game Over, stop all" .  Good luck, I hope that helps.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#3 2008-01-05 10:32:49

pachipachi
Scratcher
Registered: 2008-01-04
Posts: 15

Re: Help with game please.

Thank you, that helped!  big_smile 

I will be letting everyone see a preview of the game as soon as the first level is complete.  wink

Offline

 

#4 2008-01-05 10:43:57

pachipachi
Scratcher
Registered: 2008-01-04
Posts: 15

Re: Help with game please.

Ok, yay! Got the life thing down. I also have score and time- I think I'll be able to make more levels, but since there is a timer, I need a little help. In the game the cat has to collect muffins (lol!). I want it to be that the cat has to get atleast five muffins on the first level before the time runs out, then when the time runs out (if the cat has five muffins or more) it will take her to the next level.

Offline

 

#5 2008-01-05 10:45:56

funkymonkey
Scratcher
Registered: 2007-06-03
Posts: 1000+

Re: Help with game please.

archmage made a pretty good project avout movement. here is the link: http://scratch.mit.edu/projects/archmage/72848
you should see how it works, then maybe use his script in your project.


http://i243.photobucket.com/albums/ff67/hprules_photos/banner2.jpg
Kuzimu: Dawn of a New Age                                                                                                  Coming May 2010

Offline

 

#6 2008-01-05 10:53:11

funkymonkey
Scratcher
Registered: 2007-06-03
Posts: 1000+

Re: Help with game please.

ok, i'l try to help with the level thing...
first make a variable called muffins. then use these 2 scripts for the cat or whatever the character is
<when green flag clicked>
<forever>
<if> <touching[ muffin
<change{ muffins   }by( 1


<when green flag clicked>
<reset timer>
<forever>
<if> <( <{ level }> <=> 1 )>
<wait until><( <timer> <>> 179 )>
<if> <( <{ muffins   }> <>> 4 )>
<change{ level }by( 1
<else>
<set{ level }to( 1

something like that. i hope i helped!

Last edited by funkymonkey (2008-01-05 12:48:49)


http://i243.photobucket.com/albums/ff67/hprules_photos/banner2.jpg
Kuzimu: Dawn of a New Age                                                                                                  Coming May 2010

Offline

 

#7 2008-01-05 11:07:12

pachipachi
Scratcher
Registered: 2008-01-04
Posts: 15

Re: Help with game please.

Thank you guys! -goes to trie-
...ok, I coded in the muffin thing. Looks like I'm having trouble coding in level 2 though. D:

Offline

 

#8 2008-01-05 11:18:46

funkymonkey
Scratcher
Registered: 2007-06-03
Posts: 1000+

Re: Help with game please.

what do you mean? what is the problem


http://i243.photobucket.com/albums/ff67/hprules_photos/banner2.jpg
Kuzimu: Dawn of a New Age                                                                                                  Coming May 2010

Offline

 

#9 2008-01-05 11:23:27

pachipachi
Scratcher
Registered: 2008-01-04
Posts: 15

Re: Help with game please.

I'm not excactly sure how to make level 2... I thought I could but, turns out it's more complicated for me. D:

Last edited by pachipachi (2008-01-05 11:23:54)

Offline

 

#10 2008-01-05 11:40:11

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: Help with game please.

funkymonkey, you never want to use "timer =180", because the timer can be 179.95 one time you check it, and 180.12 the next time.  You always want to use the "timer > " test, rather than an equality test.

Offline

 

#11 2008-01-05 12:01:02

funkymonkey
Scratcher
Registered: 2007-06-03
Posts: 1000+

Re: Help with game please.

kevin_karplus wrote:

funkymonkey, you never want to use "timer =180", because the timer can be 179.95 one time you check it, and 180.12 the next time.  You always want to use the "timer > " test, rather than an equality test.

ok, and also i forgot to add the <reset timer> block in the begginig, because that is pretty important too. i;ll edit it now


http://i243.photobucket.com/albums/ff67/hprules_photos/banner2.jpg
Kuzimu: Dawn of a New Age                                                                                                  Coming May 2010

Offline

 

#12 2008-01-05 12:02:35

funkymonkey
Scratcher
Registered: 2007-06-03
Posts: 1000+

Re: Help with game please.

pachipachi wrote:

I'm not excactly sure how to make level 2... I thought I could but, turns out it's more complicated for me. D:

what do you want to happen in level 2?


http://i243.photobucket.com/albums/ff67/hprules_photos/banner2.jpg
Kuzimu: Dawn of a New Age                                                                                                  Coming May 2010

Offline

 

#13 2008-01-05 12:13:30

pachipachi
Scratcher
Registered: 2008-01-04
Posts: 15

Re: Help with game please.

I'm getting it... I played around with it and got the next level. I've added a new background and made the enemy dog faster. I got rid of the timer, especially since the game will get very hard on further levels.
I want to add another enemy dog but I'm not sure how. I can make another sprite for the new enemy dog but how do I keep it from being in level 1? Oh, and how can I make it so that now you have to have 10 muffins to complete level 2?

Last edited by pachipachi (2008-01-05 12:14:51)

Offline

 

#14 2008-01-05 12:45:17

funkymonkey
Scratcher
Registered: 2007-06-03
Posts: 1000+

Re: Help with game please.

you need to have a variable called level. it will make everything easier i think. first im going to edit the first scripts that i gave you, using the level variable


http://i243.photobucket.com/albums/ff67/hprules_photos/banner2.jpg
Kuzimu: Dawn of a New Age                                                                                                  Coming May 2010

Offline

 

#15 2008-01-05 12:49:44

funkymonkey
Scratcher
Registered: 2007-06-03
Posts: 1000+

Re: Help with game please.

here's for level 2:

<when green flag clicked>
<forever>
<if> <( <{ level }> <=> 2 )>
<wait until><( <timer> <>> 179 )>
<if> <( <{ muffins   }> <>> 9 )>
<change{ level }by( 1
<else>
<set{ level }to( 2

its basically the same thing as level 1, only with numbers switched a little

Last edited by funkymonkey (2008-01-05 12:50:27)


http://i243.photobucket.com/albums/ff67/hprules_photos/banner2.jpg
Kuzimu: Dawn of a New Age                                                                                                  Coming May 2010

Offline

 

#16 2008-01-05 12:49:56

pachipachi
Scratcher
Registered: 2008-01-04
Posts: 15

Re: Help with game please.

Ok, thanks.  smile  I have already made a variable called level, and I've been successful in getting the level to work, but I want to put in things that won't show up in any other levels, like another enemy.

Offline

 

#17 2008-01-05 12:52:13

funkymonkey
Scratcher
Registered: 2007-06-03
Posts: 1000+

Re: Help with game please.

oh, ok. so for an ememy, give it this script:
<when green flag clicked>
<forever>
<if> <( <{ level }> <=> 1 )>
<hide>
<end>
<if> <( <{ level }> <=> 2 )>
<show>
<end>
<end>

if you want it to be in every level except the first, then do this:
<when green flag clicked>
<forever>
<if> <( <{ level }> <=> 1 )>
<hide>
<end>
<if> <( <{ level }> <>> 1 )>
<show>
<end>
<end>

Last edited by funkymonkey (2008-01-05 12:54:35)


http://i243.photobucket.com/albums/ff67/hprules_photos/banner2.jpg
Kuzimu: Dawn of a New Age                                                                                                  Coming May 2010

Offline

 

#18 2008-01-05 12:53:24

funkymonkey
Scratcher
Registered: 2007-06-03
Posts: 1000+

Re: Help with game please.

pachipachi wrote:

I am making something very similiar to SnackaCat

what is the link to SnakaCat? i want to see it


http://i243.photobucket.com/albums/ff67/hprules_photos/banner2.jpg
Kuzimu: Dawn of a New Age                                                                                                  Coming May 2010

Offline

 

#19 2008-01-05 12:54:57

pachipachi
Scratcher
Registered: 2008-01-04
Posts: 15

Re: Help with game please.

Thanks! Here is the Snackacat link:
http://scratch.mit.edu/projects/Dthen/3801

Last edited by pachipachi (2008-01-05 12:55:44)

Offline

 

#20 2008-01-05 13:01:13

funkymonkey
Scratcher
Registered: 2007-06-03
Posts: 1000+

Re: Help with game please.

pachipachi wrote:

Thanks! Here is the Snackacat link:
http://scratch.mit.edu/projects/Dthen/3801

thanks. after looking at that, i think you should add a high score table for your version in the description or something. it wuld make it funner to try to beat someone else's record


http://i243.photobucket.com/albums/ff67/hprules_photos/banner2.jpg
Kuzimu: Dawn of a New Age                                                                                                  Coming May 2010

Offline

 

#21 2008-01-05 13:03:50

pachipachi
Scratcher
Registered: 2008-01-04
Posts: 15

Re: Help with game please.

Your welcome. I'll be sure to add a high score table.  big_smile

Offline

 

#22 2008-01-05 13:41:48

funkymonkey
Scratcher
Registered: 2007-06-03
Posts: 1000+

Re: Help with game please.

do you still need any help?


http://i243.photobucket.com/albums/ff67/hprules_photos/banner2.jpg
Kuzimu: Dawn of a New Age                                                                                                  Coming May 2010

Offline

 

#23 2008-01-05 16:02:53

pachipachi
Scratcher
Registered: 2008-01-04
Posts: 15

Re: Help with game please.

Ok, I need a little help! The bar which tells what level you're on isn't working right. When I get to the second level, instead of the level bar going from 1 to 2, it goes crazy and continously goes up.

Offline

 

#24 2008-01-05 16:27:20

funkymonkey
Scratcher
Registered: 2007-06-03
Posts: 1000+

Re: Help with game please.

oops. thats because of the forever block. so i think it will work normally if you just use this:
<when green flag clicked>
<if> <( <{ level }> <=> 2 )>
<wait until><( <timer> <>> 179 )>
<if> <( <{ muffins   }> <>> 9 )>
<change{ level }by( 1
<else>
<set{ level }to( 2

but im not exactly sure

Last edited by funkymonkey (2008-01-05 16:27:40)


http://i243.photobucket.com/albums/ff67/hprules_photos/banner2.jpg
Kuzimu: Dawn of a New Age                                                                                                  Coming May 2010

Offline

 

#25 2008-01-05 16:57:14

pachipachi
Scratcher
Registered: 2008-01-04
Posts: 15

Re: Help with game please.

Thanks, I'll use it if it messes up again... lol. It fixed itself! o_O Odd. I'll post if I need help again!

Offline

 

Board footer