home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Nave / planetx.swf / scripts / frame_17 / DoAction.as < prev   
Encoding:
Text File  |  2006-06-13  |  928 b   |  32 lines

  1. function testiflifelost()
  2. {
  3.    if(playerHealth < 0)
  4.    {
  5.       playerHealth = 0;
  6.       player.gotoAndPlay("lifelost");
  7.       n = getNextHighestDepth();
  8.       displayHolder.attachMovie("lifelost","ll",n);
  9.       displayHolder.ll._x = 320;
  10.       displayHolder.ll._y = 150;
  11.       landScape.thrustClip.thrustRightClip._visible = false;
  12.       landScape.thrustClip.thrustLeftClip._visible = false;
  13.       landScape.thrustClip.thrustUpClip._visible = false;
  14.       landScape.thrustClip.thrustDownClip._visible = false;
  15.       attachMovie("playerExplosion","playerExplosion",7);
  16.       playerExplosion._x = 320;
  17.       playerExplosion._y = 230;
  18.       playerExplosionSnd.start();
  19.       lives--;
  20.       if(lives < 0)
  21.       {
  22.          trace("game over");
  23.          state = "game over";
  24.       }
  25.       else
  26.       {
  27.          state = "paused";
  28.       }
  29.    }
  30.    this.lifeMeter_clip.life_bar_clip._xscale = playerHealth;
  31. }
  32.