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

  1. # Droids Cog Script
  2. #
  3. # D0_skyway.cog
  4. #
  5. # Skyways cog
  6. #
  7. #
  8. #
  9. # [MT]
  10. #
  11. #
  12. # (C) 1997 LucasLearningLimited. All Rights Reserved
  13.  
  14.  
  15.  
  16. symbols                     
  17. thing               elevdoor1                linkid=1
  18. thing               elevdoor2                linkid=1
  19. thing               camera2                  linkid=4       local               
  20.  
  21. flex                speed1=1.0                        
  22. flex                speed2=1.0               
  23. flex                speed3=1.0               
  24. flex                speed4=1.0               
  25. flex                speed5=1.0               
  26.  
  27. flex                sleeptime1=0.0
  28. flex                sleeptime2=0.0
  29. flex                sleeptime3=0.0
  30. flex                sleeptime4=0.0
  31. flex                sleeptime5=0.0
  32.  
  33. message             startup
  34. message             arrived
  35. message             pulse
  36. message             timer
  37. message             user0
  38.  
  39. thing               teledest
  40. thing            camera2
  41.  
  42. surface             conv1
  43. surface             conv2
  44. surface             conv3
  45. surface             conv4
  46.  
  47. vector              Cvector
  48.  
  49. cog                 deploycog
  50.  
  51. thing               ghost6                   linkid=4
  52. thing               ghost7                   linkid=4
  53. thing               ghost8                   linkid=4
  54. thing               ghost9                   linkid=4
  55.             
  56. int                 camint                   local
  57.  
  58. sound               conveyorloop
  59. sound               conveyorstop
  60. sound               elevsound
  61. end
  62.  
  63. ## Code Section
  64. code    
  65.  
  66. user0:
  67.      player=getlocalplayerthing();
  68.      print("this is a big droid");
  69.      convloop=playsoundthing(conveyorloop, getsurfacecenter(conv1), .75, 2, 3, 0x1);
  70.      teleportthing(player, teledest);     
  71.      anim1=slidewall(conv1, Cvector, 2.0);
  72.      anim2=slidewall(conv2, Cvector, 2.0);
  73.      anim3=slidewall(conv3, Cvector, 2.0);
  74.      anim4=slidewall(conv4, Cvector, 2.0);
  75.      setpulse(0.1);
  76.      camrand=rand();
  77.      if (camrand < 0.25) {
  78.           print("path6");
  79.           camint=2;
  80.           camera2=ghost6;
  81.           speed1=1.0;      
  82.           speed2=1.5;
  83.           sleeptime1=2.0;
  84.      }    
  85.      else if (camrand < .5) {
  86.           print("path7");
  87.           camint=3;
  88.           camera2=ghost6;
  89.           speed1=1.0;
  90.           speed2=1.0;
  91.           speed3=2.0;
  92.           sleeptime1=3.0;
  93.           sleeptime2=1.15;
  94.      }
  95.      else if (camrand < .75) {
  96.           print("path8");
  97.           camint=4;
  98.           camera2=ghost8;
  99.           speed1=1.0;
  100.           speed2=1.0;
  101.      }
  102.      else {
  103.           print("path9");
  104.           camint=5;
  105.           camera2=ghost9;
  106.           speed1=1.0;
  107.           speed2=1.0;
  108.           speed3=1.0;
  109.      }          
  110.      setcamerafocii(2, player, camera2);
  111.      setcurrentcamera(2);
  112.      movetoframe(camera2, 1, speed1);  
  113.      settimer(2);
  114.      return;
  115.      
  116. timer:
  117.      if (getsenderid()==1) {
  118.           sendmessage(deploycog, user1);    
  119.      }
  120.      else if (getsenderid()==2) {
  121.         movetoframe(camera2, 2, speed2);
  122.     }
  123.      else if (getsenderid()==3) {
  124.         movetoframe(camera2, 3, speed3);
  125.     }                          
  126.      else if (getsenderid()==4) {
  127.         movetoframe(camera2, 4, speed4);
  128.     }
  129.      else if (getsenderid()==5) {
  130.         movetoframe(camera2, 5, speed5);
  131.     }
  132.      else {
  133.           movetoframe(elevdoor1, 1, 1);
  134.           movetoframe(elevdoor2, 1, 1);
  135.           playsoundthing(elevsound, elevdoor1, 1.0, -1, -1, 0);
  136.      }
  137.     return;
  138.      
  139. arrived:
  140.      curframe=getcurframe(camera2);
  141.      if (curframe==1) {
  142.           if (sleeptime1!=0) settimerEX(sleeptime1, 2, 0, 0);
  143.           else movetoframe(camera2, 2, speed2);
  144.      }
  145.      if (curframe==2) {
  146.           if (sleeptime2!=0) settimerEX(sleeptime2, 3, 0, 0);
  147.           else movetoframe(camera2, 3, speed3);
  148.      }
  149.      if (curframe==3) {
  150.           if (sleeptime3!=0) settimerEX(sleeptime3, 4, 0, 0);
  151.           else movetoframe(camera2, 4, speed4);
  152.      }
  153.      if (curframe==4) {
  154.           if (sleeptime4!=0) settimerEX(sleeptime4, 5, 0, 0);
  155.           else movetoframe(camera2, 5, speed5);
  156.      }     
  157.      return;
  158.      
  159. pulse:
  160.      
  161.      playerY=vectory(getthingpos(player));
  162.      if (playerY>0.485) {
  163.           stopanim(anim1);
  164.           stopanim(anim2);
  165.           stopanim(anim3);
  166.           stopanim(anim4);
  167.           stopsound(convloop, 0.1);
  168.           playsoundlocal(conveyorstop, .75, 0.0, 0);
  169.           settimerEX(0.5, 1, 0,0);
  170.           setpulse(0);
  171.      }     
  172.      
  173.      return;
  174.  
  175.    
  176. end
  177.