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

  1. # Droids COG Script
  2. #
  3. # b0_Pulley_rop.cog
  4. #
  5. # Cog designed to put the struts in for the "same" part of the pulley setup.
  6. #
  7. #    user0        rope sag
  8. #    user1        rope tite
  9. # Desc:
  10. #     01/27/98 [DGS]    Created
  11. #    03/12/98 [JP]
  12. # ========================================================================================
  13.  
  14. symbols
  15. message        startup
  16. message        activate
  17. message        arrived
  18. message        pulse
  19. message        timer
  20.  
  21.  
  22.  
  23. thing          platform    linkid=3
  24. thing          pullthing   
  25. thing        rope1a
  26. thing        rope1b
  27. thing        rope1c
  28. thing        rope1d
  29. thing          rope2
  30. thing          rope3
  31. thing          rope4
  32. thing          rope5
  33. thing          rope6
  34. thing          rope7
  35. thing          rope8  linkid=1 
  36.  
  37. surface        button0  linkid=1
  38. surface        button1  
  39.  
  40. int        move=10
  41. flex        l_size=0
  42. flex        l_speed=1     local  
  43.  
  44. thing     spool     linkid=5    
  45. sound     rope=FLYt3pulleyLp.wav local
  46.  
  47. cog       jawa
  48.  
  49. end
  50.  
  51. code
  52. startup:
  53.        addbeam(rope1a, rope2, 147, l_size);
  54.         addbeam(rope1b, rope2, 147, l_size);
  55.         addbeam(rope1c, rope2, 147, l_size);
  56.         addbeam(rope1d, rope2, 147, l_size);
  57.         addbeam(rope2, rope3, 147, l_size);
  58.         addbeam(rope3, rope4, 147, l_size);
  59.         addbeam(rope4, rope5, 147, l_size);
  60.         addbeam(rope5, rope6, 147, l_size);
  61.         addbeam(rope6, rope7, 147, l_size);
  62.         addbeam(rope7, rope8, 147, l_size);
  63.         
  64.     rock = 1;
  65.     //setpulse(1);
  66.      ropeloose=1;
  67.      tug=0;
  68.      //pullthing is that round thing you activate
  69.     return;
  70.  
  71. activate:
  72.     print("ropeactivate");
  73.     if ( (ropeloose == 1) && (tug == 0) )
  74.           {
  75.           if (getsenderid() == 5) // if the player pulled on the activator 3do
  76.              {
  77.              //ropes a moving
  78.                print("ropesmove");
  79.                tug=1;
  80.                movetoframe(rope1a, 1, l_speed);  //1st four ropes attached to rope2
  81.                movetoframe(rope1b, 1, l_speed);
  82.                movetoframe(rope1c, 1, l_speed);
  83.                movetoframe(rope1d, 1, l_speed);
  84.                movetoframe(rope2, 1, l_speed);
  85.                movetoframe(rope3, 1, l_speed);
  86.                movetoframe(rope4, 1, l_speed);
  87.                movetoframe(rope5, 1, l_speed);
  88.                movetoframe(rope6, 1, l_speed);
  89.                movetoframe(rope7, 1, l_speed);
  90.                movetoframe(rope8, 1, l_speed);
  91.                //pullthing and platform a moving
  92.                //movetoframe(pullthing, 1, l_speed); 
  93.                movetoframe(platform, 1, l_speed);
  94.                dwplaycammyspeech(16310, "TGCA058.wav", 5, 2);
  95.                ropei=playsoundthing(rope, spool, 1.0, -1, -1, 0x1);
  96.                settimer(3);
  97.                ropeloose=2;
  98.                sendmessage(jawa, user1);
  99.              }
  100.           }
  101.           
  102.      else if ( (ropeloose == 2) && (tug == 0) )
  103.           {
  104.           if (getsenderid() == 5)
  105.                {
  106.                tug=1;
  107.                movetoframe(rope1a, 0, l_speed);
  108.                movetoframe(rope1b, 0, l_speed);
  109.                movetoframe(rope1c, 0, l_speed);
  110.                movetoframe(rope1d, 0, l_speed);
  111.                movetoframe(rope2, 0, l_speed);
  112.                movetoframe(rope3, 0, l_speed);
  113.                movetoframe(rope4, 0, 0.1);
  114.                movetoframe(rope5, 0, 0.1);
  115.                movetoframe(rope6, 0, l_speed);
  116.                movetoframe(rope7, 0, l_speed);
  117.                movetoframe(rope8, 0, l_speed);
  118.                movetoframe(platform, 0, l_speed);
  119.                dwplaycammyspeech(16321, "TGCA059.wav", 5, 2);
  120.                ropei=playsoundthing(rope, spool, 1.0, -1, -1, 0x1);
  121.                settimer(3);
  122.                ropeloose=1;
  123.                }               
  124.           }
  125.         
  126.  
  127.          return;
  128.  
  129.  
  130.  
  131. //
  132. timer:
  133.           stopsound(ropei, 0.2);
  134.           sleep(1);
  135.           tug=0;
  136.           return;
  137.     
  138. //arrived:
  139. //          if (getcurframe(platform) == 0)
  140. //               {
  141. //               movetoframe(rope4, 0, l_speed);
  142. //               movetoframe(rope5, 0, l_speed);     
  143. //               print("move45");          
  144. //               }               
  145. //          return;
  146.  
  147. end
  148.  
  149.  
  150.  
  151.  
  152.