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

  1. # Droids COG Script
  2. #
  3. # 00_HelptextTimer.cog
  4. #
  5. # Displays Help messages with optional timeouts 
  6. #
  7. # Desc (original):
  8. #    Two sectors, startsector and startsecotr2 will trigger the message number
  9. #    specified by messagenumber. The stopsectors display message 0, effectively
  10. #    turning it off.
  11. #
  12. # Desc (Timer version):
  13. #    There are now two new variables, displaytime and show_once. 
  14. #    Displaytime, if set to a number larger than 0, will only
  15. #        display the message for the number of seconds it's set to.
  16. #    Show_once, if set to 1, will display the message only once then never 
  17. #        display it again. 
  18. #
  19. #         [MT]    Created
  20. # 11/03/97    [DGS]    Added Printtext commands for debugging
  21. # 11/04/97    [DGS]    Added    two more start and stop sectors
  22. # 12/03/97    [DGS]    Modified "Helptext" to add timeouts and one-offs (see desc. above).
  23. # 03/10/98     [JP]      Modified to add 2nd message. 
  24. # 04/28/98     [JP]      This is it, with the voice files and such  
  25. # ========================================================================================
  26.  
  27. symbols
  28. message         entered
  29. message        timer
  30.  
  31. cog            m2          #companion message by cammy
  32.  
  33. sector              surface        linkid=1
  34. sector              battery        linkid=2
  35. sector              repair         linkid=3
  36. sector              counterw       linkid=4
  37. sector              watertanks     linkid=5
  38. sector              gonk           linkid=6
  39.  
  40.  
  41. int                 messagenumber
  42. int            displaytime=0    
  43. int            show_once=1  local
  44. int            show_once2=1 local
  45. int            show_once3=1 local
  46. int            show_once4=1 local
  47. int            show_once5=1 local
  48. int            show_once6=1 local
  49.  
  50.        
  51. end
  52.  
  53. code
  54. entered:
  55.     // show_once is set to 0 if it's off, 1 if it's only going to show once, and 2 if it's been shown.
  56.           
  57.      if (getsenderid() == 1)        
  58.           {                            
  59.           if (show_once < 2)
  60.                {
  61.                   dwplaycammyspeech(16001, "M3CA002.wav", 5, 2); //all right rebel agent...
  62.             print("message1");    //Debug Lines
  63.             printint(messagenumber);
  64.                  if (show_once == 1 ) show_once = 2;        //It's been shown. 
  65.                }
  66.           }
  67.           
  68.      else if (getsenderid() == 2)
  69.           {     
  70.           if (show_once2 < 2)
  71.                {                                                                     
  72.                dwplaycammyspeech(16002, "M3CA003.wav", 5, 2);  //battery                      
  73.                print("message1");  //Debug Lines                                     
  74.                printint(messagenumber);                                              
  75.                     if (show_once2 == 1 ) show_once2 = 2;          //It's been shown.  
  76.                }
  77.           }
  78.           
  79.      else if (getsenderid() == 3)                                                 
  80.           {
  81.           if (show_once3 < 2)
  82.                {                                                                     
  83.                dwplaycammyspeech(16003, "M3CA004.wav", 5, 2);  //repair            
  84.                print("message1");  //Debug Lines                                     
  85.                printint(messagenumber);                                              
  86.                     if (show_once3 == 1 ) show_once3 = 2;          //It's been shown.  
  87.                }
  88.           }     
  89.     
  90.      else if (getsenderid() == 4)                                                       
  91.           {
  92.           if (show_once4 < 2)         
  93.                {                                                                     
  94.                dwplaycammyspeech(16005, "M3CA006.wav", 5, 2);  // c/w
  95.                print("message1");  //Debug Line16191s                                     
  96.                printint(messagenumber);                                              
  97.                     if (show_once4 == 1 ) show_once4 = 2;          //It's been shown.  
  98.                }
  99.           }     
  100.                                                                               
  101.      else if (getsenderid() == 5)                                                  
  102.           {
  103.           if (show_once5 < 2)         
  104.                {                                                                        
  105.                dwplaycammyspeech(16020, "M3CA015.wav", 5, 2);  //h20 tanks
  106.                print("message1");  //Debug Line16191s                                   
  107.                printint(messagenumber);                                                 
  108.                     if (show_once5 == 1 ) show_once5 = 2;          //It's been shown.     
  109.                }
  110.           }
  111.     
  112.      else if (getsenderid() == 6)                                                          
  113.           {                                                                          
  114.           if (show_once6 < 2)                                                        
  115.                {                                                                     
  116.                dwplaycammyspeech(16006, "M3CA007.wav", 5, 2);  //gonk           
  117.                print("message1");  //Debug Line16191s                                
  118.                printint(messagenumber);                                              
  119.                     if (show_once6 == 1 ) show_once6 = 2;          //It's been shown.
  120.                }                                                                     
  121.           }                                                                          
  122.  
  123.  
  124.  
  125.      
  126.                    
  127.                             
  128.      return;
  129.                                                                  
  130.      
  131. end
  132.  
  133.  
  134.  
  135.  
  136.