home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Classicos / RadioactiveSnakesFromMa.swf / scripts / DefineSprite_218 / frame_1 / DoAction.as
Encoding:
Text File  |  2006-06-20  |  972 b   |  49 lines

  1. id = _name.substring(1,2);
  2. if(id > _root.players)
  3. {
  4.    _Y = -999;
  5.    stop();
  6. }
  7. else
  8. {
  9.    ltxt = "Player " + id + " Life:";
  10.    if(_root.players == 1)
  11.    {
  12.       if(_root.player[id].lives < 0)
  13.       {
  14.          lives = "Game Over";
  15.       }
  16.       else
  17.       {
  18.          lives = "Lives: " + _root.player[id].lives;
  19.       }
  20.       score = "Score: " + _root.player[id].score;
  21.    }
  22.    else
  23.    {
  24.       if(_root.player[id].vspoints < 0)
  25.       {
  26.          score = "Dead...";
  27.       }
  28.       else
  29.       {
  30.          score = "Pills: " + _root.player[id].vspoints;
  31.       }
  32.       lives = "Wins: " + _root.player[id].score;
  33.    }
  34.    live = _root.player[id].life / 720 * 100;
  35.    if(live > 100)
  36.    {
  37.       live = 100;
  38.    }
  39.    life._width = live;
  40.    if(_root.clock == 1 and _root.player[id].life > 0)
  41.    {
  42.       _root.player[id].life -= 2;
  43.    }
  44.    else if(_root.clock == 1 and _root.player[id].speed > 0)
  45.    {
  46.       _root.player[id].speed = 0;
  47.    }
  48. }
  49.