home *** CD-ROM | disk | FTP | other *** search
- player_x = MC_gameboard.MC_player._x;
- player_y = MC_gameboard.MC_player._y;
- player_frame = MC_gameboard.MC_player._currentframe;
- skyline_back_x = MC_gameboard.MC_skyline_back._x;
- skyline_front_x = MC_gameboard.MC_skyline_front._x;
- meteors_x = MC_gameboard.MC_meteors._x;
- level_display_x = MC_gameboard.MC_leveltext._x;
- meteorcounter++;
- if(dropdelay < meteorcounter)
- {
- meteorcounter = 0;
- r = random(16) + 1;
- if(eval("MC_gameboard.MC_meteors.MC_meteor" add r)._currentframe == 1)
- {
- tmprnd = random(17) + 1;
- tmpframe = 2;
- if(_root.gLevel + 1 >= tmprnd)
- {
- tmpframe = 3;
- }
- eval("MC_gameboard.MC_meteors.MC_meteor" add r).gotoAndStop(tmpframe);
- eval("MC_map.MC_meteors.MC_meteor" add r).gotoAndStop(tmpframe);
- }
- }
- a = 1;
- while(a < 17)
- {
- if(eval("MC_gameboard.MC_meteors.MC_meteor" add a)._currentframe == 19)
- {
- eval("MC_gameboard.MC_meteors.MC_meteor" add a)._y = 0;
- eval("MC_map.MC_meteors.MC_meteor" add a)._y = 0;
- eval("MC_map.MC_meteors.MC_meteor" add a).gotoAndStop(1);
- eval("MC_gameboard.MC_meteors.MC_meteor" add a).gotoAndStop(1);
- }
- if(1 < eval("MC_gameboard.MC_meteors.MC_meteor" add a)._currentframe)
- {
- tmpy = eval("MC_gameboard.MC_meteors.MC_meteor" add a)._y + 3;
- if(tmpy < 500)
- {
- eval("MC_gameboard.MC_meteors.MC_meteor" add a)._y = tmpy;
- eval("MC_map.MC_meteors.MC_meteor" add a)._y = tmpy;
- }
- else
- {
- gOrig_x = MC_gameboard._x;
- gOrig_y = MC_gameboard._y;
- rattlecounter = 1;
- eval("MC_gameboard.MC_meteors.MC_meteor" add a)._y = 0;
- eval("MC_map.MC_meteors.MC_meteor" add a)._y = 0;
- eval("MC_map.MC_meteors.MC_meteor" add a).gotoAndPlay(20);
- eval("MC_gameboard.MC_meteors.MC_meteor" add a).gotoAndPlay(20);
- missed += missscale;
- }
- if(MC_gameboard.MC_player.hitTest(eval("MC_gameboard.MC_meteors.MC_meteor" add a add ".MC_collission")))
- {
- tmptype = eval("MC_gameboard.MC_meteors.MC_meteor" add a)._currentframe;
- tmpframe = MC_gameboard.MC_player.MC_heat_vision._currentframe;
- if(tmptype == 2)
- {
- _root.gScore += 50;
- eval("MC_gameboard.MC_meteors.MC_meteor" add a).gotoAndPlay(7);
- eval("MC_map.MC_meteors.MC_meteor" add a).gotoAndPlay(7);
- collected++;
- }
- if(tmptype == 3)
- {
- if(14 < player_frame && player_frame < 26 || 69 < player_frame && player_frame < 81)
- {
- _root.gScore += 100;
- eval("MC_gameboard.MC_meteors.MC_meteor" add a).gotoAndPlay(7);
- eval("MC_map.MC_meteors.MC_meteor" add a).gotoAndPlay(7);
- collected++;
- }
- else
- {
- eval("MC_gameboard.MC_meteors.MC_meteor" add a).gotoAndPlay(31);
- if(facing == 0)
- {
- MC_gameboard.MC_player.gotoAndPlay(24);
- }
- else
- {
- MC_gameboard.MC_player.gotoAndPlay(83);
- }
- if(0 < speed)
- {
- speed = 5;
- }
- else
- {
- speed = -5;
- }
- hitcounter = 30;
- health -= hit_damage;
- }
- }
- }
- }
- a++;
- }
- if(0 < rattlecounter)
- {
- rattlecounter++;
- tmprnd = 4 >= random(10) ? -1 : 1;
- MC_gameboard._x = gOrig_x + random(10) * tmprnd;
- MC_gameboard._y = gOrig_y + random(10) * tmprnd;
- }
- if(10 < rattlecounter)
- {
- rattlecounter = 0;
- MC_gameboard._x = gOrig_x;
- MC_gameboard._y = gOrig_y;
- }
- a = 0;
- while(a < 5)
- {
- if(speed < xgoal)
- {
- speed += 1;
- }
- if(xgoal < speed)
- {
- speed -= 1;
- }
- a++;
- }
- player_x += speed;
- a = 0;
- while(a < 3)
- {
- if(ygoal < altitude)
- {
- altitude--;
- }
- if(altitude < ygoal)
- {
- altitude++;
- }
- a++;
- }
- player_y += altitude;
- if(player_y < 120)
- {
- player_y = 120;
- }
- if(360 < player_y)
- {
- player_y = 360;
- }
- if(300 < player_x)
- {
- player_x = 300;
- skyline_back_x -= Math.abs(speed) / 2;
- skyline_front_x -= Math.abs(speed);
- meteors_x -= speed;
- level_display_x -= speed;
- }
- if(player_x < 240)
- {
- player_x = 240;
- skyline_back_x -= speed / 2;
- skyline_front_x -= speed;
- meteors_x -= speed;
- level_display_x -= speed;
- }
- if(skyline_back_x < -1139)
- {
- skyline_back_x = 0;
- }
- if(0 < skyline_back_x)
- {
- skyline_back_x = -1139;
- }
- if(skyline_front_x < -1459)
- {
- skyline_front_x = 0;
- }
- if(0 < skyline_front_x)
- {
- skyline_front_x = -1459;
- }
- if(meteors_x < -2535)
- {
- meteors_x = 0;
- }
- if(0 < meteors_x)
- {
- meteors_x = -2535;
- }
- MC_map.MC_player._x = 15 - MC_gameboard.MC_meteors._x / 9;
- MC_map.MC_player._y = 10 + player_y / 10;
- if(1 < health)
- {
- MC_health_bar.gotoAndStop(50 - health);
- }
- MC_gameboard.MC_player._x = player_x;
- MC_gameboard.MC_player._y = player_y;
- if(rattlecounter == 0)
- {
- MC_gameboard.MC_skyline_back._x = skyline_back_x;
- MC_gameboard.MC_skyline_front._x = skyline_front_x;
- MC_gameboard.MC_meteors._x = meteors_x;
- }
- displayScore(true);
- MC_missed.gotoAndStop(missed + 1);
- MC_gameboard.MC_leveltext._x = level_display_x;
- hitcounter--;
- if(hitcounter == 1)
- {
- setdir = facing;
- }
- keycounter = 0;
- if(hitcounter < 1)
- {
- checkcounter = 0;
- if(Key.isDown(81))
- {
- _root.gotoAndPlay("GameOver");
- }
- if((Key.isDown(Key.Right) || setdir == 0) && keycounter == 0)
- {
- keycounter++;
- setdir = -1;
- xgoal = 18;
- facing = 0;
- if(55 < MC_gameboard.MC_player._currentframe)
- {
- MC_gameboard.MC_player.gotoAndPlay(1);
- MC_map.MC_player.gotoAndPlay(1);
- }
- }
- else
- {
- checkcounter++;
- }
- if((Key.isDown(Key.Left) || setdir == 2) && keycounter == 0)
- {
- keycounter++;
- setdir = -1;
- xgoal = -18;
- facing = 1;
- if(MC_gameboard.MC_player._currentframe < 56)
- {
- MC_gameboard.MC_player.gotoAndPlay(56);
- MC_map.MC_player.gotoAndPlay(56);
- }
- }
- else
- {
- checkcounter++;
- }
- if(Key.isDown(Key.Shift))
- {
- if(facing == 0)
- {
- xgoal = 46;
- }
- else
- {
- xgoal = -46;
- }
- }
- else
- {
- if(facing == 0)
- {
- xgoal = 22;
- }
- else if(facing == 1)
- {
- xgoal = -22;
- }
- checkcounter++;
- }
- if(Key.isDown(Key.Down) && keycounter == 0)
- {
- keycounter++;
- if(facing == 0)
- {
- if(player_frame < 11 || 13 < player_frame)
- {
- MC_gameboard.MC_player.gotoAndPlay(11);
- MC_map.MC_player.gotoAndPlay(11);
- }
- }
- else if(player_frame < 66 || 69 < player_frame)
- {
- MC_gameboard.MC_player.gotoAndPlay(66);
- MC_map.MC_player.gotoAndPlay(66);
- }
- ygoal = 12;
- }
- else if(Key.isDown(Key.Up) && keycounter == 0)
- {
- keycounter++;
- if(facing == 0)
- {
- if(player_frame < 7 || 10 < player_frame)
- {
- MC_gameboard.MC_player.gotoAndPlay(7);
- MC_map.MC_player.gotoAndPlay(7);
- }
- }
- else if(player_frame < 62 || 64 < player_frame)
- {
- MC_gameboard.MC_player.gotoAndPlay(62);
- MC_map.MC_player.gotoAndPlay(62);
- }
- ygoal = -12;
- }
- else
- {
- checkcounter++;
- ygoal = 0;
- }
- if(Key.isDown(Key.Space) && keycounter == 0)
- {
- keycounter++;
- if(facing == 0)
- {
- if(player_frame < 15 || 35 < player_frame)
- {
- MC_gameboard.MC_player.gotoAndPlay(15);
- MC_map.MC_player.gotoAndPlay(15);
- }
- xgoal = 4;
- }
- else
- {
- if(player_frame < 70 || 90 < player_frame)
- {
- MC_gameboard.MC_player.gotoAndPlay(70);
- MC_map.MC_player.gotoAndPlay(70);
- }
- xgoal = -4;
- }
- heatdelay = 5;
- }
- else
- {
- if(facing == 0)
- {
- if(14 < player_frame && player_frame < 36)
- {
- MC_gameboard.MC_player.gotoAndPlay(5);
- MC_map.MC_player.gotoAndPlay(5);
- }
- }
- else if(69 < player_frame && player_frame < 91)
- {
- MC_gameboard.MC_player.gotoAndPlay(60);
- MC_map.MC_player.gotoAndPlay(60);
- }
- checkcounter++;
- heatdelay--;
- }
- if(checkcounter == 5)
- {
- if(facing == 0)
- {
- MC_gameboard.MC_player.gotoAndPlay(5);
- }
- else
- {
- MC_gameboard.MC_player.gotoAndPlay(60);
- }
- }
- }
-