View Full Version : I need... Alot of help ):
Edwina
11-24-2007, 02:58 PM
Okay, this is going to be a super duper long post of me SEEKING HELP! :o
Here goes... I NEED to complete 2 games by Jan14 (5Weeks) for my school final year project. Although i take the module advanced authoring in school, i barely passed (grade:D:rolleyes: ) AND NOW!, i have to complete the 2 games for my final year project. Although i would like someone to just complete the games for me, i can't, haha! So i need help, help on what kind of codes should i use. Let me tell you about the two games.
I'm sure most of you played Hong Kong Cafe game by Maggiemarket. YES, i have to do a similar game.
Hong Kong Cafe (http://www.funnyflash.com/details.php?id=146&cid=2748)
Da Pai Dong (http://www.funnyflash.com/details.php?id=166&cid=2748)
Basically, i need help on almost all the codes because i have never done a game like thatttt. I have not started on the codes yet.
What kind of codes should i use to achieve:
Having the characters choose the food they want to order (in which the food will pop up in a bubble)
How do i achieve this effect, like when the customer order a plate of hot dog and sausage, i have to drag both the hot dog and sausage to the plate before i can pass it to the customer?
How to i make the sausage be placed on a default area on the plate, and the egg on the other area? (For example, sausage always on the left, egg always on the right)
How do we make the characters 'eat' when i pass the food to them
How do i make the characters go back to ordering when they have finish their food
I have animated my characters to be eating, and still. What kind of codes should i use? Any link reference? I might just be pulling my hair out because of this game. :confused:
The other game i guess will be slightly easier, and is similar to Doodle on Miniclip.
Doodle Game (http://www.miniclip.com/games/doodle/en/)
Also, not yet started, but i can do the moving, scoring blah.
Ok, how to:
Make the whole scene move up/left when the character move more to the top and more to the right? (EG, when i move the char right, the whole bg moves to the left to allow us to see the other side of the game)
How do i make them walk on the lines? (Is it some gravity issues here?)
Make them jump?
I KNOW THAT'S SUPER ALOT, HAHA ): But yes, that is how much help i need, it concerns my life and deatth! I'm from Singapore though, so if you are someone from Singapore as well and can do these games, contact me! I need help, haha!
Hope to get some replies, & hope you are not bored to death with my LONG post ):
TJones
11-24-2007, 09:02 PM
Hmm....
Well, that is quite alot and I hate to be the bearer of bad news, but what you have asked is more than what anyone will probably be able or willing to write in a post. What you need to do is read up on a few game books for flash and get some foundation and basics underneath your belt.
If I was you i'd IMMEDIATELY get my hands on these books:
Flash MX Game Design Demystified
Flash MX ActionScript for Fun and Games
ActionScript for Flash MX the Definitive Guide
You can either go out and buy them at the local book store or you could sign up for an online book account at http://safari.informit.com. With the online account you get to try it for 14 days free, and with the minimum subscription, you can have 5 books on your bookshelf. I know for a fact that the 1st and 3rd books I listed are available through the account.
Your problem sounds more of a lack of understanding of the basics and ability to break down functionality into it's smaller parts. For instance:
You ask how to move a background? Well, think about that for a minute. How do you move any visual object in flash? By augmenting an object's X and Y coordiantes incrementally over a period of time. So basically, to move your background, you have to move it the same way. Only difference is you have a set of conditionals or logic that determine where the player is and if the background needs to be scrolled, stopped, at it's furthest left, etc.
So:
1 - Acquire access to the books mentioned above.
2 - Read through the Demystified book thoroughly as you will learn alot of theory and common practices to help you suit your needs.
3 - Use the 3rd book as a reference to get more details about things like functions, loops, syntax, etc.
4 - code it all in ActionScript 1.0. Trying to program in 2.0 with classes and such is only going to cause you more headache and you will have real issues with scope, etc...
With your deadline, I don't really know what else to tell you. These books will give you more of the info that you need. When you get stuck on a particular problem or don't find solutions or examples that are similar to what you want to do, then the forums are a good place to get help.
Good Luck on your projects!
TJ
Edwina
11-25-2007, 10:53 AM
Hello! Thanks. I do have a couple of books and CD-Roms which i borrowed from my school library. I admit i do have really a lack of understanding in actionscript, haha! Now my problem is, i really am at a loss at what codes i should use to even start o.o
i have read through the books, and i understand the codes and all in the books. BUT, when i need to incorporate into my own with additional features, then i get all lost and confused. =/
But anyway, thanks so much for all the advice! i guess i will go get the books you recommended and really start cracking my brains! :D
But then, if there is still anyone who can give me some reference, do help, thanks so so so much!
I think the doodle game is not necessarily easier than the restaurant game. The doodle game will involve more math to handle the hit detection, gravity, acceleration, etc.
Some things you might want to look up for the cafe game: onPress, onRelease, onReleaseOutside, startDrag, stopDrag, _x, _y
I would probably use setInterval and clearInterval, but since you are a beginner, you might want to stick with using the movieclips' timelines to determine how long the cooking stage takes, how long the eating stage takes, etc.
You might want to learn about arrays and for loops to handle multiple customers, but a lot of beginners get by with the "copy and paste the same code five times" method.
garlandpool
11-27-2007, 11:14 PM
Edwina,
Sounds like you're really in a bit of a hole. You need to go after each thing you need step-by-step. Flash can make you go crazy if you don't get help. I have been fighting to learn it for over 10 years and I still don't know that much. I have been making some serious gains over the past few years and I owe most of it to what I learned on one site: www.bit-101.com (http://www.bit-101.com/tutorials/gravity.html) I did the "gravity tutorial" on that site and learned something very useful about how to set up a movieClip in flash so that it makes using code easier. There's a lot of reading, and if you do read it, you'll understand it better...but if you just want to "cheat" to save time, you can just scroll all the way to the bottom and it'll tell you what goes in each frame. There's only one part that's confusing and that's at the very end. The way the guy wrote it, you'll probably thing that the dragging codes go in the 3rd frame...but they don't. They actually go ON a button you're supposed to create inside that movieClip.
You actually might want to go to that site and just take a moment to go through the tutorial. It has that drag and drop stuff in it. But, the most important thing I learned was how to create three keyframes to put actionscript into. If you pay attention to what is happening, you end up with the first frame only being played once, at the very beginning and the 2nd and 3rd frames being played over and over (which is a "loop"). It's a great way to make many cool things happen with the actionscript. Pretty much all my simple games are made that way. You can see some of them in action if you go here: FREE FLASH LESSONS (http://www.rosettastoneofguitar.com/flash.html)
I'm creating these for my Flash students and I've broken them down into as small a steps as I can possibly imagine. I think if you learned some of these steps, you could get many, if not all, of the things you need to happen for your game(s).
If you need some additional help and you explain it well to me, I might (if I can find the time) create a little video for you on my site. After all, whatever I create will also benefit my students, as I will be making them do that work too.
Fred
Edwina
11-29-2007, 12:27 PM
THANKS SO MUCH! I'm having difficulty with the hawker game, because it's something i have never done before. To be honest, i have difficulty grasping actionscripting, if i have a choice i will never do this project, haha but i don't have a choice.
As for the doodle game, i already have lots of coding reference so it's less of a headache.
But for the hawker, i need help. You can download the FLA file to take a look. not much done though =/
HAWKERCENTRE FLA (http://www.geocities.com/helloiamedwina/HawkerCentre.fla)
Let me know if there r any errors.
On the 2nd frame, is my game layout. The left side characters, i named it char1_mc. and in the movieclip, i have diff frames of them
1) Still
2) Eating
3) Order Toast
4) Order Chicken
first level they will only get to order two dishes. I used this code
var food:Array = new Array("chickenrice","satay")
function getFood(char)
{
randomFood = Math.random()*food.length
orderedFood = food[randomFood]
trace(orderedFood)
char.gotoAndStop(orderedFood)
};
getFood(char1_mc);
under my AS layer. what do i have to further change to make my char order either toast or chicken? :D
garlandpool
11-29-2007, 07:18 PM
I changed your code a little and got it to trace the random food:
var food:Array = new Array("chickenrice","satay")
function getFood(char)
{
randomFood = random(food.length);
orderedFood = food[randomFood];
trace(orderedFood);
char.gotoAndStop(orderedFood);
};
getFood(char1_mc);
Try that and see if it works the way you want it.
The first thing I did was put semi-colons at the end of each line inside the function. I think you have to have them. Then, I noticed when the trace window pops up it was showing "undefined". So, I decided to try trace(randomFood); I noticed that it was giving me a strange decimal instead of a nice round number. So, I took away the Math part in front of the random line. Then, I put the food.length inside the ()'s. Then I was getting 0, and 1 in the output window. So, that made me happy. Then I put what you had back in the trace(); and found that I was getting the two food choices you probably wanted.
So, I was actually pretty happy, as I am not that strong with working on arrays. In fact, the moment I saw that you were using one, I wasn't sure if I would let you down or not. I feel better about arrays now! Thanks! Let me know if you need more help. I'm in a good mood!
Fred
garlandpool
11-29-2007, 08:20 PM
Hey,
I spent a few more moments looking at your file. I noticed that inside the char1_mc you have a couple of frames named "chicken_order" and "toast_order", but inside your function you say:
char.gotoAndStop(orderedFood);
If you look at your choices from the array, you have "chickenrice" and "satay", so, it's going to end up saying:
char.gotoAndStop(chickenrice);
OR
char.gotoAndStop(satay);
Which, as it is right now, will end you up playing NO frames inside that movieClip. So, you need to either change the frame names inside char1_mc to "chickenrice" and "satay"...or change the names in the array to "chicken_order" and "toast_order". I don't know if that's the way you want to go, I'm just still thinking about it and I thought I'd add this, in case you weren't aware.
Fred
garlandpool
11-29-2007, 08:36 PM
Here's the code for being able to drag objects. This might be "old school" way of doing it, but it's the way I know:
on(press){
startDrag(this);
dragging=true;
}
on(release, releaseOutside){
stopDrag();
dragging=false;
}
I put this code on one of your chicken symbols to see if it would work and it did. Before it would work, though, I had to break it apart to get it out of the "Group" it was in. I don't totally understand what "Group" means. If someone knows, please clue me in.
Anyway, I thought you would really really need this code, from what you said you intended to do for your game. I don't know where you want to drag and drop your chickens, but this should get you started.
I posted the file for you to download:
http://www.rosettastoneofguitar.com/singapore/
You should be able to find the fla and the swf there. Let me know if it helps!
Fred
Edwina
11-30-2007, 02:37 PM
OMG FRED, THANKS SO MUCH! You have been the greatest help to me, i figured that out! :D Also, i can get the drag and drop to be done.
But how do i make my drag and drop like this:
1) I need cucumber, rice and chicken to complete the order.
So i want it to be like, when i drag and drop all the cucumber, rice and chicken, then the order will be complete for me to drag the whole plate to the customer? :D
I LOVE YOU TONS FOR ALL THE HELP!
Edwina
11-30-2007, 02:41 PM
Fred, i will be asking you plenty of questions duing my time of project, hope you don't mind! and if you don't mind helping me, but don't like to converse here, we could try other ways (email, yahoo, msn) but then if you don't mind posting answers to all my questions here, i'm fine with you.
really really really couldn't find any suitable words to express my gratitude.. this is a group project, 5 members but only 2 programmers, including me the lousy grade one.. so really stressed out figuring out the codes, thanks for ur help!!!
garlandpool
11-30-2007, 10:20 PM
HEY! I'm so glad to hear your excitement! I really had fun working with your array. I actually straightened out my understanding of them because of your project. After I helped you with that, I opened up a new file and started trying all the tricks I could find in the help files for arrays. Now, I actually feel like I have a decent understanding of them!
So, you got the dragging stuff to work? That's great! I didn't explain everything in my message. I should have said that I had to "Break Apart" and then "Convert To Button". But, it sounds like you figured that out.
So, you want to be able to drag a number of items to the dish, then that enables the dish to be dragged? I kind of thought you were going to do something like that. I actually noodled with making that happen, I got a little of it to work, but I haven't come across a way yet, that would make it work smoothly.
Do you know how to do a "hitTest"? You'd probably want to do something like...add this code on the Button symbol:
on(press){
startDrag(this);
dragging=true;
}
on(release, releaseOutside){
stopDrag();
dragging=false;
if(this.hitTest(_parent.dish)){
_x=_parent.dish._x;
_y=_parent.dish._y;
}
}
I did that, but when I put the dragging code on the plate, and tried dragging the plate, the plate moved, but the food didn't follow. So, that's as far as I got.
Fred
Edwina
12-01-2007, 07:02 AM
hello fred, i did the game with a new layout, you can download it below to take a look . i managed to make the 2 characters order. and i did all the dragging codes with the satay store (not the chicken) the hit test cannot work.. might find some codes later on..
anyway, how do i make them order at intervals? :D like say, i don't want both of them to order at the same time.. at the start of the game, maybe there will be a 1-2sec delay before they order.. does this have to do with the setinterval codes?
thanks so much much for your help.. i seem to be asking too much, well almost everything ): but glad you can help me, definitely gained more knowledge on actionscripting! :D
HAWKERCENTRE3 FLA (http://www.geocities.com/helloiamedwina/HawkerCentre3.fla)
garlandpool
12-03-2007, 10:41 PM
You need to setup a loop for the hitTest to work. I downloaded your file and saw where you put the hitTest. The code for the hitTest is right, but it's not checking for it constantly unless you put it in a loop somewhere.
As for setting it up for waiting a few seconds before something happens...same thing.
If you watch my video on "3 Frame Architecture (http://www.rosettastoneofguitar.com/fms/captivate/flash/21threeFrames/1threeFrames_nName.htm)", you'll see what has made all the difference to me in making my games. I mean, this one concept made practically everything I do possible. This is the thing I learned from that gravity tutorial on www.bit-101.com (http://www.bit-101.com/tutorials/gravity.html) that made me realize the importance of initializing and looping. It changed my life as a flash guy!
It's so powerful and easy if you do things that way that I do practically everything that way.
Anyway, if you setup a symbol with the 3 frames as shown in the video, then the first frame would have:
timer=100;
And the second frame would have:
timer-=1;
if(timer<=0){trace("Time to Order!");}
I use this setup all the time when I want something not to happen right away.
I'm telling you about this 3 frame stuff because it works. You have to believe me! :p In fact, I did a little editing to your file and you can download it here to see for yourself:
http://www.rosettastoneofguitar.com/singapore/
Look inside the symbols: "drag_rice" and "drag_bowl" and you'll see the loops I'm talking about. You'll also see a fourth frame that I called "hide"...I'm using that frame to make it dissapear when the hitTest is triggered.
If you look inside the symbols: "show-hideRice" and "show-hideBowl" you'll see that I'm using just two frames, each labeled "hide" and "show" to make it appear on the plate.
I imagine that as you make each of these items appear on the plate, you'll need to also make something be true...like, if you make the rice appear on the plate, you'll also want a variable to become true. Then, if when you drag the whole plate to the customer, all the right elements are true when the hitTest between the plate and an area on the table happens, the customer will eat and be pleased...otherwise a different animation will play, showing the customer get made or something....? Anyway, it's all possible if you set things up like I'm thinking.
Let me know how it goes...
Fred
Edwina
12-05-2007, 07:13 PM
i think i might be a little disappointing this time, cos i'm kinda lost at some of the stuffs here. i updated my recent fla with the symbols you did and the 3 frame things.. you can download the recent one here. i put the hittest codes u gave me few post earliers on the first 3 satays..
FLA
(http://www.geocities.com/helloiamedwina/HawkerCentreMadness3.fla)
i'm very lost.. haha you can say that my knowledge is really really very limited. i might sound very stupid asking these questions, that might seem very easy to you, so pardon me! :D
i'll skip the timer part for the time being, because i can do that at the later part.
i saw that you create new symbols for me, and add in the 3frame codes into my sataysauce and rice.. anyway, i've edited the rice and the plate to be as a whole, so the the plate and rice is one symbol together to make life easier (don't have to drag the rice) only have to drag the satay and satay sauce.
so, regarding loops.. how do i implement the use of show-hidebowl and show-hideRice?
what i need to do next is, make the drag work.. as in drag two satay and one sauce, den i can drag the whole thing away to the char, if the order is not complete i am unable to drag the whole plate.. and when the char received the food, there will be score..
for variables.. how do i code it to make the thing work? any simple examples? cos i'm really lost now (blame myself for the lack of so much knowledge, doing this project is really a struggle ):
thanks so much for ur help!
ps.. if you don't mind, this is one question i also asked in another forum, but no help..
How do i change the code so that when i drag the satay to the dish, they will be placed at diff coordinates on the plate?
arg, i seem to be asking everything.. so sorry! ):
Instead of the on(press) stuff, you can do it another way that will be more flexible.
Put this code on the main timeline, not on the food:
function dragFood () {
startDrag(this);
}
function releaseFood () {
stopDrag();
//here you test to see if you've put the food on the plate
//if you have, then make the plate draggable with this:
//plate.onPress=dragPlate;
//plate.onRelease=releasePlate;
}
function dragPlate {
startDrag(this);
}
function releasePlate {
//test to see if you've dropped it on a customer
//if it matches their order, etc.
}
food.onPress = ableToDrag;
food.onRelease = releaseFood;
AS2 doesn't have the ability to change the parent of the food movieclip, (AS3 does) so I think you have to delete or hide the food movieclip when you are placing it on the plate, and make a bunch of different frames for the plate, where each frame has a different combination of food. Then you use plate.gotoAndStop() to go to the frame with the right kind of food in the picture.
Edwina
12-06-2007, 02:56 PM
i saw a drag and drop code on kirupa. am i able to apply the codes on the tutorial? the link is here
http://www.kirupa.com/developer/actionscript/dragdrop.htm
i can make diff frames of my dish, each having diff ingredients and then finally the final product in the last frame. and use the codes in the tut. will that be better?
however in the tut, when i drag the brush to the computer, the conputer goes to thecolor frame but the brush stays there, how do i add in additional codes such that when i drag the brush to the computer, the brush disappears.. but the computer will turn yellow, cos i had drop my target on the computer..
(: help appreciated! THANKS!
edit/
hm i did an afterthought.. if im using the codes from the tut to do in my drag and drop, how am i suppose to make it when i drag the first satay, it goes to the frame with one satay.. when i drag the sauce, it will go to the frame with the satay and sauce.. cos users playing will not always drag the ingredients in order.. if anyone could catch what i mean..
garlandpool
12-06-2007, 06:18 PM
Okay,
I would do things similar to what rrh said, about making individual keyframes inside the plate symbol, showing different food combinations. But, what I did what slightly different to that. I'm not sure if it is better for your purpose, but I think it would be. It's actually already in that last file I posted of your work: What I did was create symbols like "show-hideRice" and "show-hideBowl". If you look inside those symbols, you'll see that in the first frame, which is labeled "hide", there is no graphic. But, in the second frame, called "show" there is a graphic. That is how I planned to get the items to appear. It's like those symbols are sitting on the plate, already in their proper positions, just waiting to get hit by those symbols you are dragging around. As soon as they are hit, they jump to the "show" frame.
And, I did the same sort of thing inside the symbols you get to drag around.
If you look inside each of the draggable symbols, you'll see that there are 4 frames. The first one doesn't do anything at this point, but the 2nd holds the hitTest. Now, if you look at the 3rd frame, it just says "gotoAndPlay(2):" which is what causes the hitTest to be looped. So, since the hitTest is in the loop, it will get checked constantly until told to stop. Notice how inside the hitTest code, it says:
if (_parent.dish.hitTest(this._x,this._y,true)) {
_parent.dish.bowl.gotoAndStop("show");
gotoAndStop("hide");
}
The first line just says "if this thing hits that thing called "dish", then these things will happen.
The second line says, "one of the things that will happen is, inside the "dish" symbol there is a "bowl" symbol and I want that timeline inside the "dowl" to move to the frame called "show". So, that makes the bowl appear.
The 3rd line just says "I also want this timeline inside where we are to move to the "hide" frame". So that makes this, the dragging bowl dissapear. Right? Notice that the timeline inside the symbol where we are reading this code has a 4th frame called "hide"?...and there is no graphic when you move to that frame?
This is the foundation for what I think will make everything in your game work. If you practice this kind of setup, pretty much everything should go smoothly. I'm not skilled enough to manage making your game happen very many other ways. I know just enough to be dangerous!
Hopefully you see that if you do it this way, you won't have to create a special frame for each combination of foods. I mean, I wouldn't want to do all that. If you just load up the plate with a bunch of "show-hideFoodName" symbols, they will simply appear when they get hit with the right draggable food (and, of course each draggable food will dissapear because the hitTest inside them makes them dissapear, too).
The only thing left is to somehow setup the moment when you drag the entire loaded plate to the customer. How will we make it check for the fact that each food is correct? I don't think it will be that hard, but I don't for sure see how without experimenting. Probably need to make the hitTest inside the draggable object also set something to be true...like:
if (_parent.dish.hitTest(this._x,this._y,true)) {
bowl=true;
_parent.dish.bowl.gotoAndStop("show");
gotoAndStop("hide");
}
Then, after a bunch of food is loaded, you'll have a bunch of these things be "true" and you could check for the "trueness" of each of these variables at the moment the hitTest happens between the dish and the customer table.
Does this help?
Fred
Edwina
12-08-2007, 01:43 PM
yes! haha i finally realised whats going on and how come i cant catch your initial explaination.. cos you did the brown thingy as the dish.. so i got confused!
can you take a look at mine?
FLA 4 (http://www.geocities.com/helloiamedwina/HawkerCentre4.fla)
My dish is actually the plate with the square cubes of rice (ugly i know, lol) so i did the sataysauce thingy, and two satays. u can try dragging the first two satays..
my questions now are:
1) becos i have 5 satays altogether.. i cannot duplicate one and place all the same one on the bowl right? if u get what i mean..
i tried putting my dragsatay as all the 5 satays, and on the dish, i copy and paste 5 same showhidesatay.. but it doesn work for me, because when i dragged the first one, it shows.. but the rest, it just disappeared. haha..so just wondering whether i can duplicate.. if not what method can i use? cos now i only did the first 2 satays.. and on the dish at diff x, y coords. as for the rest how do i do them? for the x,y cords.. the user playing the game doesn neccessary will click the first two..
in the beginning, i thought i can just use the same dragsatay and same showhidesatay, but it can't work.. so just wondering what should i do? (:
i'm happy i finally got the hittest to work!
oh ya, another question, so sorry! (u r like my teacher now =x) because in e game, the chars will order a few orders.. so i got to have MANY plates MANY satays. can i duplicate them and stack them on top of each other? so what the user see is actually one plates, but it is actually maybe 5-6 plates duplicate and stacked on top of each other..
let me know if this method will work! THANKS SO SO SO SO MUCH!
garlandpool
12-10-2007, 10:39 PM
Hi,
Sorry about the confusion with the two plates. I'm glad to see you were able to sort that out. Now I know which one you mean to use as the plate! What is the brown thingy, anyway...is it for cooking the food?
Okay, so your question is a good one, about the duplicate satays and stuff. So, before I think I can really understand what will be best, I need to know more about how the whole game is going to work.
Is the person who is playing the game going to keep serving food to more and more customers as the game goes on? How will they get points? Do they get points every time they put the right combination of food in front of a customer?
I think you should do all you can to make it as easy as possible for yourself. For example, if being able to put more than one satay thing on the plate is creating a problem for you, then maybe you shouldn't allow that to be an option. You know what I mean? I actually played that game you said you are basing this off of, and I see that they don't allow you to put more than one kind of a food on a plate.
And, I'm thinking about how the array you set up has to come into play. Somehow, when the orders are made, it needs to build the array.
I'm going to think about how to do these things in the simplest way and get back to you. In the mean time, maybe you can let me know how you want the game to work. I need to know this to show you how to do things right.
Fred
PS, I don't mind helping you with this stuff...it's been fun for me and a good learning experience. Once we get through this stuff, I plan to share how we did it with my students.
Edwina
12-11-2007, 05:33 PM
hey fred, yes u got it right.. i have to re serve and reserve the customers until the timer (which i8 haven put it up) runs out.. they get points when i serve the right combination to them, for eg if the order chicken rice, i have the serve the chicken rice in the right combination (rice + chicken + cucumber)
i think i get what you are talking about the putting more than one thing at a time, maybe for the satay, i can hmm.. put 2 satays in one movieclip, so when i drag them, it will be only dragging one movieclip instead of me needing to drag two..
so let's say.. my satays are all dragSatay and on all my plates, i have showhideSatay only.. oh ya, as for the question on copying and pasting many plates on top of each other because i need to serve many orders.. do i have to use arrays to do them? :D
to make things easy, i will sumarise how the game is going to be played.
1) The customers ordered
2) We serve the right combination of food, and drag it to them. If the combination and order is right, points will be added.
3) They will eat for a few secs (I have the eating animation inside the character MC) and then, go back to ordering again.
4) So the cycle goes on and on, until the timer runs out (Let's say 3mins)
5) My game has two levels (Second level, there will be 3 stalls) So if in the first level, the player get to a certain score, they can advance to the second level.
6) I'm not worried about doing second level, because i know if i can complete the first level, i can do the second level with ease.
That's basically how it's played. Pretty similar to the one in the link just that mine has two levels :D
PS: I'm really really really very grateful for all that help. I was so afraid you might think I'm asking too much and stop helping me, but you did not. If there is anything i can do for you (I doubt so, in actionscript, haha) just tell me. Thanks so so much! *Real grateful from the bottom of my heart.
THANKS FRED!
garlandpool
12-11-2007, 10:15 PM
Hey! Yeah, I don't mind helping you out. I see this as a bit of a challenge myself. As I said, I'm learning too and once I get it down, I plan on showing my students. So, I don't mind helping you at all. I appreciate that you are very thankful and everything. So, far, this has been pretty fun!
Only thing is, right now things have gotten pretty busy...I don't know how much I can play with this right now. I have been trying a few things today but not getting very far. I actually ended up making a new file and just trying to simplify things.
Anyway, I'll be thinking about your code and I will get back to you as soon as I get a good idea on how to make it all work as simple as possible. I mean, there are all kinds of ways to make this work...but the one I want is a way that makes building the next step easier.
Right now, I can move the food to the plate and have it appear there, where it should...then I can drag the plate to the customer in the same way and have him acknowledge the kind of food being set in front of him. So, the next step for me is doing the same thing with a few more food items on the plate. It shouldn't be too hard...just need time to work with it.
By the way, are you going to want to be able to cook the food? I think it would be pretty cool...of course, it would be more steps...but cool.
I'll be getting back to you soon...let me know if you make any progress.
Fred
Edwina
12-12-2007, 04:05 PM
hello! me and my group thought about the cooking part, but due to our tight schedule, we got to forget about the cooking and just go straight to the displaying of food, haha! our whole project deadline is january 14th though (:
i'm still stuck at the same part, only putting the food to the plate.. do let me know if you figure something out, meanwhile i will do my best too! :D
thanks so much, will update you if i made any progress too! :D
Edwina
12-14-2007, 01:59 PM
Hello Fred, how's the progress? Anyway i provided the link of my game file of my progress so far, it only includes till the drag and drop of the plates.
As for allowing the customer to acknowledge the right food, i'm pretty lost on that. for the bowl=true and other stuffs that need to be true.. pretty lost, so i did not touch on that.
Link for FLA (http://www.geocities.com/helloiamedwina/HawkerCentre5.fla)
Let me know if you made any progress and teach me, haha! (I'm like your student too, only online, haha)
Thanks!
garlandpool
12-19-2007, 08:24 PM
Edwina,
I caught a cold! Yeah, I'm not feeling well today and I have been sick for a few days...but I happen to be fooling around with your game and I made some progress that I think you can learn from and apply to the rest of your game. Oh, and, by the way, I like the smoke effect you put on the satays. Here's the strategy I used, in words, then I'll let you see the fla file:
Inside the dish symbol I wrote a line of code that says:
satayDish=false;
Then I figured out a way to get the satayDish to equal "true" when both the satay and the bowl of sauce get put on the dish. Inside the satay symbol, the second frame is when the satay appears on the dish. So I wrote:
satayOnTray=true;
Then, I also wrote some code that says:
if (_parent.bowl.bowlOnTray==true) {
_parent.satayDish=true;
}
Do you see how it works? At the moment the satay appears on the dish, it declares the variable satayOnTray=true; and it checks to see if the same thing has already happened inside the bowl (if bowlOnTray is also true) and if it is, it makes the satayDish=true. So, in other words, I did the same thing inside the bowl symbol. They both check eachother and if they find the other one to be true, then the satayDish is true.
The next step is inside the place where the plate will land when you set it in front of the customer.
If you look inside the plate landing area, you'll see the code for checking to see if the hitTest happens with the plate. I also made the "satayDish" being true part of the condition. And if the hitTest happens and the satayDish is true, then the eating animation plays.
I also did something nice for the animation. I set it up to play about 5 times before stopping. I thought it didn't look good enough for them to just animate once.
I didn't go so far as to do the exact same thing inside the landing area for the plate...you know how we have the bowl dissapear and appear on the plate when it hits the plate? Well, you should probably set it up the same inside the landing area for the plate...that way you can't drag it away as or after they eat.
Here is the path to the fla file:
http://www.rosettastoneofguitar.com/singapore/
Let me know if this helps!
Fred
Edwina
12-20-2007, 09:20 AM
wow, all the codes gave me a headache.. haha! anyway, i read through your codes, and did some changes. I made the chickendish true and stuffs, so now both the customers can acknowledge both dishes..
FLA (http://www.geocities.com/helloiamedwina/HawkerCentre6.fla)
thanks so much for the help! anyway, do have a good rest and take care of your health!
how do i go to the next step from here? my friend will be implementing the timer for me, and the first stage will be 120secs.. anyway, how do i make the customer order again after he is full? i took a look @ the codes and saw that after 5 times of eating, goes to frame one.. however how do i make him go back to ordering? (:
oh ya! how do i make the plate stay on the table when i drag the right food to the table, and the plate NOT to stay when i drag the wrong food? after this, how do i make the plate disappear once the char re order? it's the hit test codes right? sorry so many questions!
i wanted to add one more feature in which i forgot, haha! which is, if i take very long to prepare, lets say the customer has already waited for 10secs.. points will be deducted. i might make a frame which shows the character getting angry under their mc..
what's left of my game
1) making the food stay on the table
2) scoring
3) order looping
(:
thanks again and do take care!
Edwina
01-02-2008, 03:18 PM
hi fred, im wondering how you are! anyway, my deadline is coming and i'm stuck and desperate for help, haha! i posted a help topic about my placement in the and forum.. goes like this.
Any kind soul who wants to help can download the FLA file here and read below!
DOWNLOAD FLA (http://www.geocities.com/helloiamedwina/HawkerCentre12.fla)
I did all my drag and drop codes, now i need the whole plate to STAY PUT on the table when my order is right. My initial game was only 2 orders max and 2 character orders max. So the codes given was inside the first character, under Layer 7, there is this PlateLanding icon. And under the MC, on frame 2 The codes given are:
Quote:
if ((this.hitTest(_parent._parent.dish))&&(_parent._p arent.dish.satayDish==true)&&(_parent.satayOrder== true)) {
//Stop the dragging
stopDrag();
//Make it so it can't be dragged again
_parent._parent.dish.busy=true;
//Position the plates nicely
if (_parent._name == "char1_mc"){
//Left table ordered Satay!
_parent._parent.dish._x = 69;
_parent._parent.dish._y = 184;
} else {
//Right table ordered Satay!
_parent._parent.dish._x = 200;
_parent._parent.dish._y = 200;
}
gotoAndStop(4);
} else if (this.hitTest(_parent._parent.dish)){trace("This isn't what I ordered!");}
if ((this.hitTest(_parent._parent.ChixDish))&&(_paren t._parent.ChixDish.ChixDish==true)&&(_parent.chick enOrder==true)) {
//Stop the dragging
stopDrag();
//Make it so it can't be dragged again
_parent._parent.ChixDish.busy=true;
//Position the plates nicely
if (_parent._name == "char1_mc"){
//Left table ordered Chicken!
_parent._parent.ChixDish._x = 69;
_parent._parent.ChixDish._y = 204;
} else {
//Right table ordered Chicken!
_parent._parent.ChixDish._x = 200;
_parent._parent.ChixDish._y = 200;
}
stopDrag();
gotoAndStop(4);
} else if (this.hitTest(_parent._parent.ChixDish)){trace("Th is isn't what I ordered!");}
if ((this.hitTest(_parent._parent.toastDish))&&(_pare nt._parent.toastDish.toastDish==true)&&(_parent.to astOrder==true)) {
//Stop the dragging
stopDrag();
//Make it so it can't be dragged again
_parent._parent.toastDish.busy=true;
//Position the plates nicely
if (_parent._name == "char1_mc"){
//Left table ordered Chicken!
_parent._parent.toastDish._x = 69;
_parent._parent.toastDish._y = 204;
} else {
//Right table ordered Chicken!
_parent._parent.toastDish._x = 200;
_parent._parent.toastDish._y = 200;
}
stopDrag();
gotoAndStop(4);
} else if (this.hitTest(_parent._parent.toastDish)){trace("T his isn't what I ordered!");}
For now, i only made the orders stay on the first two characters because the given codes only allow to make me put it in 2 coords.. Anyone can tell me how do i go about editing the codes to make it stay on the 2nd table (left and right respectively. i tried adding the ELSE IF into the ifelse codes, but i think i'm doing it wrong. PLEASE HELP ME!!
I use the same plate landing for all my chars, let me know where should i change it or where i have done wrong, thanks!
---------
thats my help! can you help me? or is there any easier way? i tried to do the same way as how i make the satay appear and all that, but it cant work ):
garlandpool
01-14-2008, 05:54 PM
Edwina,
I'm back at work now. I've been sick all Christmas break and a whole week into the new year. It's been like, the worse flu I've had in 10 years. Anyway, I forget when your deadline is...how are you on the project. I just downloaded your last posting. Looks like you've made some progress. I'm wondering where your work is at now. I think you posted that last one on the 2nd of January. So, I imagine you've progressed a lot since then.
I'm sorry I disappeared off the radar screen for so long. I've been miserable...
But, if there's still time and you need it, I'm ready to help, if I can.
Fred
garlandpool
01-14-2008, 05:58 PM
As I read through and see that one of your problems is getting the plate to stay if it's right...I don't know if you're still trying to solve that, but my advise would be to treat it exactly the way you treat each of the pieces of food you have to put on the plate before you serve the meal. You know what I mean? I would handle it the same way. It really is the same sort of behavior.
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.