home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 January / Chip_2004-01_cd1.bin / oddech / flashgames / stress / install / stresspaint.exe / scripts / frame_172 / DoAction.as
Text File  |  2002-07-26  |  982b  |  40 lines

  1. hitrate = Math.round(hits / totalshots * 100);
  2. if(isNaN(hitrate))
  3. {
  4.    hitrate = 0;
  5. }
  6. if(level == 7)
  7. {
  8.    messages.level = "GAME OVER";
  9.    messages.score = "your score: " + score;
  10.    messages.shots = "shots fired: " + actualshots;
  11.    messages.hitrate = "your hit rate: " + hitrate + "%";
  12.    blnGameOver = true;
  13.    if(50 < hitrate)
  14.    {
  15.       messages.message = "WELL DONE! GAME COMPLETE.";
  16.    }
  17.    else
  18.    {
  19.       messages.message = "Oh Dear !  Look\'s like it\'s GAME OVER";
  20.       blnGameOver = true;
  21.    }
  22. }
  23. else
  24. {
  25.    messages.level = "Level " + level;
  26.    messages.score = "your score: " + score;
  27.    messages.shots = "shots fired: " + actualshots;
  28.    messages.hitrate = "your hit rate: " + hitrate + "%";
  29.    if(50 < hitrate)
  30.    {
  31.       messages.message = "nice shooting time for the next level";
  32.    }
  33.    else
  34.    {
  35.       messages.message = "oh dear ! you didn\'t shoot well enough for the next round";
  36.       blnGameOver = true;
  37.    }
  38. }
  39. stop();
  40.