helicopter game
Hi mozilla
I tried to attach your sample script to the character man, but
it doesn't work. I think i need to attach a script to the helicopter,
because it can land without any problem.
I didn't understood the "trace"-thing, i always had a debugger
window: with the "not allowed to land window"...
I hope that you understand me...
Thanks again for your kind help !
Hi again (Thanks Mozilla for your reply)
I have still the problem, that it's possible to land, without going
to save the person (character:man)
If the player wants to land, without having saved the person, a
message should appear: "not allowed to land, save the person"
I have the following actions for the helicopter to land:
function checkForLand () {
landed = true;
for (i=0; i<footPoints.length; i++) {
footDown = false;
for (j=0; j<bars.length; j++) {
if (bars[j].hitTest(heli._x+footPoints[i].x, heli._y+footPoints[i].y, true)) {
footDown = true;
break;
}
}
if (!footDown) {
landed = false;
break;
}
}
if (heli.dy>3.0) {
landed = false;
}
if (landed) {
gotoAndPlay (_currentframe+1);
gameLevel++;
And these actions are for the character:
onClipEvent (enterFrame) {
if (hitTest("_parent.heli")) {
_x = _parent.heli._x;
_y = _parent.heli._y+50;
(_parent.heli._height/2);
}
}
onClipEvent (enterFrame) {
if (hitTest("_parent.hospital1")) {
_x = _parent.hospital1._x-0;
_y = _parent.hospital1._y-1;
(_parent.hospital1._height/2);
}
}
Thanks in advance for your help... regards from zurich, switzerland
cuba
Last edited by cuba; 03-10-2002 at 06:26 PM.
|