I've finally gotten my new Wacom Bamboo tablet; awesome tablet, I love it. I decided to download Scratch to make interactive games. I've heard of it on other websites and some really nice games have been made!
I'm an amateur to this, so I understand little. I'm making an interaction game called Survival where you flip through island scenes, gathering food and water to survive; sometimes even making shelter!
As you can see, it will be very long and detailed if you want it to be lots of challenging survival scenes. The game should last forever but there will never be an unlimited food or water source; that's the challenge. However, it won't be like farming for food or anything annual, not making a little village to survive in or trying to escape, just surviving.
Okay, the game aside, I need help on how to make it! I can draw EVERYTHING, but I need to know how to control Scratch and put the right scripts:
1. I deleted the little cat and started on the background - two trees, the ground, the sky, the sun, a distant hill and a sprout of tall grass. There will be more, but that's my starting scene in progress.
2. Now I should start on the sprites? If I want to draw a blueberry bush, should I draw it as a sprite and add it there?
3. If I've done the background and first sprite... What scripts should I add and how should I add them? I REALLY need help on how to use this!
Thanks and I promise to mention all who help when I load the project!
Offline
I've figured out most of clicking... I tested by drawing a bush with berries then adding the following scripts:
When Sprite 1 clicked
Play sound Pop
Say "A blueberry bush!" for 2 secs
Ask "Take blueberries?" and wait
It works so far. Adding more now... Any help is appreciated.
Offline
DewleafWolf wrote:
I've figured out most of clicking... I tested by drawing a bush with berries then adding the following scripts:
When Sprite 1 clicked
Play sound Pop
Say "A blueberry bush!" for 2 secs
Ask "Take blueberries?" and wait
It works so far. Adding more now... Any help is appreciated.
Well, if you want a choice, use this:
yes:
ask
<if> <( answer <=> yes )>
take blue berries
no:
ask
<if> <( answer <=> no )>
don't take blue berries
Hope it helps! It feels good to help a fellow Scratcher who is stuck in a rut.
Last edited by GarSkutherGirl (2011-04-21 18:47:53)
Offline
I figured that out, but thanks anyway! I've basically gotten it down, but I still would like to know how to make something drag across the screen instead of jumping from place to place. Oh yeah, and I want to know how I could make an inventory... Everytime you acquire a new object (Bowl of water, berries, a log, etc.) it should go into your inventory. I would like it to be a line across the bottom, click on it and a panel expands to show your current inventory items. That, and how do I drag things with the mouse? If I want to move the object from my inventory, how to I drag it?
So my next three projects:
1. Inventory
2. Dragging
3. Health/Thirst bars
Health and thirst bars, for the time being, are two differently colored gradient bars that should deplete unless you eat or drink water to refill it. Currently, I am making it go:
Wait 1 sec
Switch to "costume 2"
Wait 1 sec
Switch to "costume 3"
To make it go down slowly, each costume is a bit gone in the bar. When you consume something, you will gain more. I need to know how to make the food, water and bars all work together interactively... Thanks for any help again!
Offline
DewleafWolf wrote:
I figured that out, but thanks anyway! I've basically gotten it down, but I still would like to know how to make something drag across the screen instead of jumping from place to place. Oh yeah, and I want to know how I could make an inventory... Everytime you acquire a new object (Bowl of water, berries, a log, etc.) it should go into your inventory. I would like it to be a line across the bottom, click on it and a panel expands to show your current inventory items. That, and how do I drag things with the mouse? If I want to move the object from my inventory, how to I drag it?
So my next three projects:
1. Inventory
2. Dragging
3. Health/Thirst bars
Health and thirst bars, for the time being, are two differently colored gradient bars that should deplete unless you eat or drink water to refill it. Currently, I am making it go:
Wait 1 sec
Switch to "costume 2"
Wait 1 sec
Switch to "costume 3"
To make it go down slowly, each costume is a bit gone in the bar. When you consume something, you will gain more. I need to know how to make the food, water and bars all work together interactively... Thanks for any help again!
Oh! You need help with dragging? I can't remember the script, but go to Scratch sprites, and click on Draggable in the Objects folder. The script should be there.
I need help with HP bars and inventory as well, so I can't really help you there.
Last edited by GarSkutherGirl (2011-04-22 07:14:11)
Offline
I know right? They are the most common things for games! LOL. I solved my dragging problem by just making it glide... If I ever need the object to actually be dragged by the mouse to go anywhere, I'll have to do something different, probably what you said!
I decided to drop the inventory thing. I'll still look around on how to do it, but I've decided that the first Survival game will be the beta stage; the idea form; and then I will remake it to have an inventory, more complicated scripts, etc.!
As for the hunger and thirst bars, I'm keeping them, but if I can't figure out how to make them go up as you eat things, I will probably drop them as well and just make it a search.
BUT since staying alive is the only challenge in the game, there's a 99.9% chance I will keep them.
Offline
DewleafWolf wrote:
I know right? They are the most common things for games! LOL. I solved my dragging problem by just making it glide... If I ever need the object to actually be dragged by the mouse to go anywhere, I'll have to do something different, probably what you said!
I decided to drop the inventory thing. I'll still look around on how to do it, but I've decided that the first Survival game will be the beta stage; the idea form; and then I will remake it to have an inventory, more complicated scripts, etc.!
As for the hunger and thirst bars, I'm keeping them, but if I can't figure out how to make them go up as you eat things, I will probably drop them as well and just make it a search.
BUT since staying alive is the only challenge in the game, there's a 99.9% chance I will keep them.
Try using variable sliders. It might work. Lemme try it out. I'll set a shout if it does.
Offline
Aha! I think I can use variables as Hunger and Thirst meters! Is that right? I've rigged it to work out... I guess we'll see.
Offline
LOL, wow, I just saw your post before me! I guess great minds think alike. [/cheesy moment]
I tried it and it does work... Hope it works for you! I'll post a pic of what the scripts look like:
http://i51.tinypic.com/30ll7uv.png
Well, it said I can't post pics so try that link...
Offline
DewleafWolf wrote:
LOL, wow, I just saw your post before me! I guess great minds think alike. [/cheesy moment]
I tried it and it does work... Hope it works for you! I'll post a pic of what the scripts look like:
http://i51.tinypic.com/30ll7uv.png
Well, it said I can't post pics so try that link...
*GASPS*
You use tinypic, too?
Do you like either Pokemon or My Life as a Teenage Robot?
Offline
Dragging scripts:
a) just click the little padlock by the icon of your sprite (the little picture above your script)
b)
<when[ SPRITE ]clicked>
<repeat until><< <not> <mouse down?> >>
<go to[ Mouse Pointer]>
<end>
I always use this. It may be less convenient, but it is more adaptable than using the built-in drag-n-drop.
Last edited by MoreGamesNow (2011-04-22 16:26:35)
Offline
Thank you MoreGamesNow!! I will use that when I need it, which I have no doubt I will! Very helpful!
@ GarSkutherGirl: Yep. But I don't have an account, I just use it when I need it... To answer your questions: I don't watch My Life As A Teenage Robot because I don't get Nicktoons Network. But I watched it ALL the time when I did... So yes kind of. And yes to Pokemon because I watch it, used to collect the cards and I like drawing zombie versions of Pokemon. XD
Offline
Ah, I need help with this now... I have a fly sprite and lizard sprite. I used MoreGamesNow's drag-and-drop code on the fly so that you can move it around. I want it to be: drag the fly to the lizard, fly disappears as if lizard ate it. My original idea was that when the fly is dragged a certain distance away from the lizard, he would change costume from normal to tongue-sticking-out costume 2. Then when the fly sprite detects itself to be touching the pink color on the tongue, it would hide, making it look like the lizard eats the fly. However, I'm having tons of trouble getting it to disappear when touching the pink... I figured it's only because it's in the editing stage; when I post the project it may work... But I decided to just try the easier way instead. Sprite9 is fly, Sprite10 is lizard.
Here's the script I'm using:
[blocks] <when[ Sprite9 ]clicked>
<repeat until> << <not> >> <mouse down?>
<go to[ mouse pointer
<if><touching[ Sprite10
<hide>
<end>[/blocks]
What's wrong there? By the way, the lizard has no scripts, just the fly.
Thanks again for any help!
Offline
If you need an "Inventory" of sorts. (Do I have blueberries? Water? Trees?) you can always use a list.
It's basically a variable with multiple inputs, so you can add multiple items to it and it will remember them all.
Offline
For the inventory: Under the variables tab, there is a button that says "create new list." Press it, name the list "inventory." Whenever an item is added to the inventory, add a block that says (Add "item" to list "inventory").
Here's the more complicated part. Every item in a list will have a location associated with it (a number). The (Add to list) block automatically creates a new location at the end of the list. When we want to take something out of the list, we first have to determine what the item's location is. So, now create a variable (also under the variables tab) called "scan." When you want to remove an item named "berry" from the list, this is how the script will work. Let's say that the "r" key is used to remove from inventory.
When key r pressed Ask "What item do you want to remove?" Set (scan) to 0 Repeat until (item (scan) of list (inventory) = answer (under sensing tab)) or (scan = (length of list (inventory) + 1)) Change (scan) by 1 If scan = (length of list (inventory) + 1) Say "This item is not in your inventory." Else Delete item (scan) of inventory
Last edited by amcerbu (2011-04-22 23:27:44)
Offline
Spiro0 wrote:
Wow DewLeafWolf, that sounds complicated. When you're done, could you put it somewhere I could play it? Please?
I'm pretty sure that's his plan.
Lol, I would not leave something like this dusting in virtual folders.
Offline
Spiro0 wrote:
Hey, wait! I'm not a "new Scratcher". I just got my Internet connection yesterday. I've been working with Scratch for a year now!
it's account-age related.
Offline
Very funny, soupoftomato. I was going to say I like tomato soup. Hey tomato! "What?" Are you a dermatologist? Because your' really getting under my skin! -Annoying Orange
Offline
@ soupoftomato: Hmm, I didn't know that! Thanks a lot! I will have to try that! By the way, you said "his" when referring to my project... I'm a girl.
@ amcerbu: Very detailed, thanks a bunch! I will be sure to thank all of you when I post it...
@ Spiro0: I'm glad I'm not the only one who finds the game complicated-sounding! But it's my first Scratch project, so I can't really tell if it is or not. At least it is for me, but I'm new. Anyway, I will be sure to post here and message you when I finish it. The entire project will last a couple days to work on, though I've done basically a quarter of it already.
Alright, so I've figured out dragging, inventory and the hunger/thirst bars. Those were my three recent goals... Next I am working on one big thing, once I've finished the first scene:
1. Multiple scenes/places
It takes place in a field on the island. You should be able to navigate from the open field to the beach and then to the rest of the island; the huge forest. How could I do this? Can I make multiple stages besides the background: "stage"? I reckon not, so if any of you could tell me how to do it, I would have almost all info I need to complete it! (For now, of course; I will have more questions in the future, no doubt!)
By the way, I still need an answer for my post about the fly/lizard thing. That's a small question of mine unanswered... Anyway, thanks guys, again!
Offline
The whole inventory thing is REALLY complicated for what I want to do. I've made the list and made it to where when you click on each of the 10 pecans they disappear and it adds 1 pecan to your inventory, adding up to 10 pecans in the Inventory list. It works. Now how do I make something appear saying "You've found all 10 pecans, eat them?" so that I can make the eating part work...
Any help?
Offline
I hope my inventory description was readable.
Just as a sprite can have multiple costumes, the stage can have multiple backgrounds. Because of the way the scripting environment works in Scratch, only a sprite can change its own costume (directly at least). In the same way, only the stage can change its background. However, there are ways to tell other sprites what to do: with the "broadcast" and "receive" blocks.
Any sprite (or the stage) can broadcast a message. When a script starts with[blocks]<when I receive[message]>[/blocks], it will execute when "message" is broadcast. That means that one sprite can tell another what to do. It looks like you want to tell the background to change when a certain condition is true. You could add a block to the main script that broadcasts a certain message (when the time is right), which the stage then receives.
Concerning your lizard-fly problem- make sure that the if block is inside the repeat loop. It might help if you uploaded a prototype so we could look at the scripts. It's a little hard describing them in words!
About the pecan problem: I'm not sure of the structure of your scripts, but I think you could create a "pecans" variable that increases by 1 every time you find one. Put an if conditional that checks whether pecans = 10. If so, ask, "Eat them?" If yes, add something to health. If no, resume command flow.
Be careful- I don't suggest using the "forever if" loop. No one knows exactly what it does.
Did that message make sense?
Last edited by amcerbu (2011-04-23 02:47:14)
Offline