home *** CD-ROM | disk | FTP | other *** search
/ Classic Fond 52 / ClassicFond52.iso / GAMES / DROIDW.RAR / DWCD.GOB / mission_cog_t2_tiefighter.cog < prev    next >
Encoding:
Text File  |  1998-11-04  |  1.1 KB  |  52 lines

  1. symbols
  2. message             arrived
  3. message             startup
  4. message             pulse
  5. sound               tieenginewhine
  6. thing               bomberdummy0
  7. thing               bomberdummy1
  8. thing               bomberdummy2
  9. thing               bomberdummy3
  10. template            bombertemplate
  11.  
  12. end
  13.  
  14. code
  15. startup:
  16.      lasttemplate=1;
  17.      setpulse(15);
  18.      return;
  19.      
  20. pulse:
  21.      randx=rand();
  22. //     if (randx>.25){
  23.           curtemplate=bomberdummy0[rand()*4];
  24.           while (lasttemplate==curtemplate) {
  25.                 curtemplate=bomberdummy0[rand()*4];
  26.            }
  27.           call movebomber;
  28. //     }
  29.      return;
  30.  
  31. movebomber:
  32.      print("here comes the bomber"); 
  33.      vtiebomber=creatething(bombertemplate, curtemplate);
  34.      capturething(vtiebomber);
  35.      xloop=playsoundthing(tieenginewhine, vtiebomber, 1.0, 10, 75, 129);
  36.      movetoframe(vtiebomber, 1, 25);
  37.      return;
  38.  
  39. arrived:
  40.      print("stopping sound");
  41.      stopsound(xloop, 3.0);
  42.      sleep(3.3);
  43.      print("destroying vtb");
  44.      destroything(vtiebomber);
  45.      lasttemplate=curtemplate;     
  46.      return;
  47.  
  48.  
  49.      
  50. end
  51.  
  52.