Edwina
January 2nd, 2008, 11:01 AM
I think this is gonna be very confusing for everyone. I need help! I'm doing a HK cafe style game, and i need help to continue! My deadline is like this Sunday o.o
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:
if ((this.hitTest(_parent._parent.dish))&&(_parent._parent.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))&&(_parent._parent.ChixDish.ChixDish==true)&&(_parent.chickenOrder==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("This isn't what I ordered!");}
if ((this.hitTest(_parent._parent.toastDish))&&(_parent._parent.toastDish.toastDish==true)&&(_parent.toastOrder==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("This 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!
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:
if ((this.hitTest(_parent._parent.dish))&&(_parent._parent.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))&&(_parent._parent.ChixDish.ChixDish==true)&&(_parent.chickenOrder==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("This isn't what I ordered!");}
if ((this.hitTest(_parent._parent.toastDish))&&(_parent._parent.toastDish.toastDish==true)&&(_parent.toastOrder==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("This 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!