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

  1. # DroidWorks Cog Script
  2. #
  3. # 00_t_boxmove.cog
  4. #
  5. # Thrust it!
  6. #
  7. # Desc:
  8. #    Cog written to move a box down the chute and bring it back down at the end    
  9. #    at the incline place in the training level of droidworks     
  10. #
  11. #     
  12. #    05/05/98 [JP]    created
  13. #
  14. symbols
  15. message        startup
  16. message        timer
  17. message        entered
  18. message        touched
  19.  
  20. vector        vec0        desc=thrust_direction
  21. vector        vec1        desc=thrust_direction
  22. vector        vec2        desc=thrust_direction
  23. vector         vec3      desc=thrust_direction
  24.  
  25. float        speed=10.0    desc=thrust_speed
  26.  
  27. sector        sector0
  28. sector        sector1    
  29. sector        sector2
  30. sector         sector3
  31. sector         sector4
  32. sector         sector5
  33. sector         sector6
  34. sector         sector7
  35.  
  36. surface        c1   nolink
  37. surface        c2   nolink
  38. surface        c3   nolink
  39. surface        c4   nolink
  40.     
  41. int            garbage   local
  42. int            cnt       local
  43.  
  44. thing          crate     
  45. thing          door1     linkid=1       mask=0xffff
  46. thing          door2     linkid=1       mask=0xffff
  47. thing          door3     linkid=1       mask=0xffff       
  48.  
  49. sound          convsound=MCH00tCnvyr01.wav local
  50. int            volume=0.7  local
  51.  
  52. end
  53.  
  54.  
  55. code
  56.  
  57. //-----------------------------------------------------------------------------
  58.  
  59. startup:
  60.      slidewall(c1, vec2, speed);
  61.      slidewall(c2, vec2, speed);
  62.      slidewall(c3, vec3, speed);
  63.      //playsoundpos(convsound, getsurfacecenter(convey0[cnt]), volume, -1, -1, 0x1);
  64.               
  65.      SectorThrust(sector0, vec0, speed);
  66.     SectorThrust(sector1, vec0, speed); 
  67.     SectorThrust(sector2, vec1, speed);
  68.      sectorthrust(sector6, vec3, 15);
  69.      sectorthrust(sector7, vec3, 15);  
  70.      player=getlocalplayerthing();  
  71.      setactorflags(crate, 8);
  72.      return;
  73.  
  74. entered:
  75.      print("entered");
  76.      if (getsourceref()==crate) 
  77.           {
  78.           if (getsenderid()==1) 
  79.                {
  80.                movetoframe(door1, 1, 3);
  81.                movetoframe(door2, 1, 3);
  82.                movetoframe(door3, 1, 3); 
  83.                settimer(3);
  84.                //open door1
  85.                }
  86.           }
  87.      else if (getsourceref()==player) {
  88.           print("player");
  89.      }
  90.      return;
  91.      
  92. timer:
  93.      movetoframe(door1, 0, 3);
  94.      movetoframe(door2, 0, 3);
  95.      movetoframe(door3, 0, 3);
  96.      return;
  97.      
  98. end
  99.