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

  1. #standard type crate generation cog.
  2. symbols
  3. message        startup
  4. message        pulse
  5.  
  6. surface        unit1a
  7. surface        unit1b
  8. surface        unit1c
  9. surface        unit1d
  10. surface        unit1e
  11. surface        unit1f
  12.  
  13. surface        unit2a
  14. surface        unit2b
  15. surface        unit2c
  16. surface        unit2d
  17. surface        unit2e
  18.  
  19. sector         targetsector
  20.  
  21. thing          magtram
  22. thing          crate0
  23. thing          crate1
  24.  
  25. cog            tramcog
  26. end
  27.  
  28. ## Code Section
  29. code                  
  30. startup:
  31.      player=getlocalplayerthing();
  32.      randx=rand();
  33.      setadjoinflags(unit1a, 2);
  34.      setadjoinflags(unit1b, 2);
  35.      setadjoinflags(unit1c, 2);
  36.      setadjoinflags(unit1d, 2);
  37.      setadjoinflags(unit1e, 2);
  38.      setadjoinflags(unit1f, 2);     
  39.  
  40.      setadjoinflags(unit2a, 2);
  41.      setadjoinflags(unit2b, 2);
  42.      setadjoinflags(unit2c, 2);
  43.      setadjoinflags(unit2d, 2);
  44.      setadjoinflags(unit2e, 2);
  45.      
  46.      setfacegeomode(unit1a, 0);
  47.      setfacegeomode(unit1b, 0);
  48.      setfacegeomode(unit1c, 0);
  49.      setfacegeomode(unit1d, 0);
  50.      setfacegeomode(unit1e, 0);
  51.      setfacegeomode(unit1f, 0);     
  52.  
  53.      setfacegeomode(unit2a, 0);
  54.      setfacegeomode(unit2b, 0);
  55.      setfacegeomode(unit2c, 0);
  56.      setfacegeomode(unit2d, 0);
  57.      setfacegeomode(unit2e, 0);
  58. //     if (rand()>.5) call setup1;
  59. //     else call setup2;
  60. //     call setup2;   
  61. //     setpulse(1);     
  62.      return;
  63.      
  64.  
  65. setup1:
  66.      print("clearup1 called");
  67.      clearadjoinflags(unit1a, 2);
  68.      clearadjoinflags(unit1b, 2);
  69.      clearadjoinflags(unit1c, 2);
  70.      clearadjoinflags(unit1d, 2);
  71.      clearadjoinflags(unit1e, 2);
  72.      clearadjoinflags(unit1f, 2);     
  73.      
  74.      setfacegeomode(unit1a, 4);
  75.      setfacegeomode(unit1b, 4);
  76.      setfacegeomode(unit1c, 4);
  77.      setfacegeomode(unit1d, 4);
  78.      setfacegeomode(unit1e, 4);
  79.      setfacegeomode(unit1f, 4);     
  80.      
  81.      return;     
  82.  
  83. setup2:
  84.      print("clearup2 called");
  85.      clearadjoinflags(unit2a, 2);
  86.      clearadjoinflags(unit2b, 2);
  87.      clearadjoinflags(unit2c, 2);
  88.      clearadjoinflags(unit2d, 2);
  89.      clearadjoinflags(unit2e, 2);
  90.      
  91.      setfacegeomode(unit2a, 4);
  92.      setfacegeomode(unit2b, 4);
  93.      setfacegeomode(unit2c, 4);
  94.      setfacegeomode(unit2d, 4);
  95.      setfacegeomode(unit2e, 4);
  96.      return;
  97.      
  98. pulse:
  99.      if ((getdifficulty()==1)||(getdifficulty==2)) {
  100.           if ((getthingsector(crate1)==targetsector)||(getthingsector(crate2)==targetsector)) {
  101.                print("here comes the tram!");
  102.                sendmessage(tramcog, user0);
  103.           }
  104.           else print("nope.");
  105.      }
  106.      
  107.      return;
  108.           
  109.  
  110.  
  111. end
  112.      
  113.      
  114.      
  115.     
  116.  
  117.      
  118.      
  119.      
  120.      
  121.  
  122.