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

  1. function playerHitsLand(whereHit)
  2. {
  3.    player.playerHitClip.gotoAndPlay(2);
  4.    wallDamage = 1;
  5.    reduceScore();
  6.    damageSnd.start();
  7.    playerYspeed = 0;
  8.    if(whereHit == "left")
  9.    {
  10.       px += 10;
  11.       playerHealth -= wallDamage;
  12.    }
  13.    if(whereHit == "right")
  14.    {
  15.       px -= 5;
  16.       playerHealth -= wallDamage;
  17.    }
  18.    if(whereHit == "bottom")
  19.    {
  20.       py -= 10;
  21.       addThrust = 2;
  22.       playerHealth -= wallDamage;
  23.    }
  24.    if(whereHit == "top")
  25.    {
  26.       py += 10;
  27.       addThrust = 0;
  28.       playerYspeed = 0.5;
  29.       playerHealth -= wallDamage;
  30.    }
  31.    testiflifelost();
  32. }
  33.