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

  1. #standard type magnetic tram cog.
  2. #don't forget to set blocking walls to "no move"
  3. symbols
  4. message             user0
  5. message             arrived
  6. message             startup
  7. message             pulse
  8. message             timer
  9.  
  10. thing               camera              linkid=1
  11.  
  12. thing               proj0               
  13. thing               proj1
  14. thing               proj2
  15. thing               proj3               
  16. thing               proj4
  17. thing               proj5
  18.  
  19. thing               ghosttarget         linkid=2        
  20.  
  21. flex                color1=1            local
  22. flex                color2=2            local
  23. flex                color3=3            local
  24. flex                color4=4            local
  25. flex                color5=1            local
  26. flex                color6=2            local
  27.  
  28. flex                radius=0.03        local
  29.  
  30. cog                 fortresscamcog
  31. cog                 ramplightscog
  32.  
  33. template            ADroidT
  34. keyframe            walkdancekey
  35. thing               ADroidG    
  36.                                     
  37. end
  38.  
  39. ## Code Section
  40. code                  
  41. //startup:
  42. user0:                
  43.      print("startup");
  44.      curframe=1;
  45.      time=1;
  46.      setpulse(3.5);
  47.      sendmessage(ramplightscog, user0);
  48.      setcamerafocii(2, ghosttarget, camera);
  49.      setcurrentcamera(2);
  50.      player=getlocalplayerthing();
  51.      sleep(2);
  52.      addlaser(proj0, color1, radius);
  53.      addlaser(proj1, color2, radius);
  54.      addlaser(proj2, color3, radius);  
  55.      addlaser(proj3, color4, radius);
  56.      addlaser(proj4, color5, radius);
  57.      addlaser(proj5, color6, radius);      
  58.      sleep(1);  
  59.      rotatepivot(proj0, curframe, time);
  60.      rotatepivot(proj1, curframe, time);
  61.      rotatepivot(proj2, curframe, time);
  62.      rotatepivot(proj3, curframe, time);
  63.      rotatepivot(proj4, curframe, time);
  64.      rotatepivot(proj5, curframe, time);
  65.      
  66.      sleep(1);
  67. //     movetoframe(camera, 1, 3);
  68.      movetoframe(ghosttarget, 1, 3);
  69.      return;
  70.      
  71. arrived:
  72.      if (getsenderid()==1) {
  73.           dwplaycharacterspeech("tsr004", "fmad004.wav");
  74.           dwcleardialog();      
  75.           sleep(5);
  76.           print("sending message to fortress cam");
  77.           sendmessage(fortresscamcog, user0);
  78.      }
  79.      else if (getsenderid()==2) {
  80.           movetoframe(camera, 1, 3);
  81.           dwplaycammyspeech(16005, "fmca005.wav", 20, 2);
  82.      }
  83.      else {
  84.           curframe=1-curframe;
  85.           rotatepivot(proj0, curframe, time);
  86.           rotatepivot(proj1, curframe, time);
  87.           rotatepivot(proj2, curframe, time);
  88.           rotatepivot(proj3, curframe, time);
  89.           rotatepivot(proj4, curframe, time);
  90.           rotatepivot(proj5, curframe, time);
  91.      
  92.      }
  93.      return;
  94.      
  95. pulse:
  96.      playkey( (creatething(ADroidT, ADroidG)), walkdancekey, 1, 0);
  97.      return;    
  98.      
  99.  
  100. end
  101.  
  102.  
  103.