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

  1. # Droids Cog Script
  2. #
  3. # To end the level by entering a sector
  4. #
  5. #
  6. # [MT]
  7. #
  8. #
  9. # (C) 1997 LucasLearningLimited. All Rights Reserved
  10.  
  11.  
  12.  
  13. symbols
  14. message        entered
  15. message        startup
  16. message        pulse
  17. message        timer
  18. message        activate
  19.  
  20. surface        switch
  21.  
  22. sector         endsector 
  23.  
  24. template       ghosttemplate
  25.  
  26. thing          door1
  27. thing          door2
  28.  
  29. vector         launchvector
  30. end
  31.  
  32. ## Code Section
  33. code 
  34. startup:
  35.      player=getlocalplayerthing();
  36.      setwallcel(switch, 1);
  37.      return;
  38.  
  39. entered:
  40.      playerpos=getthingpos(player);
  41.      alternatecam=createthingatpos(ghosttemplate, endsector, playerpos, '0.0 0.0 0.0');
  42.      SetCameraFocii(2,player,alternatecam);
  43.      SetCurrentCamera(2);
  44.      setpulse(0.1);
  45.      settimer(4);
  46.      return;
  47.   
  48. pulse:   
  49.      setthingvel(player,launchvector);         
  50.      return;
  51.      
  52. timer:
  53.      if (getsenderid()==1) {
  54.           movetoframe(door1, 0, 3);
  55.           movetoframe(door2, 0, 3);
  56.           setwallcel(switch, 1);
  57.      }
  58.      else dwendlevel();
  59.      return;
  60.      
  61. activate:
  62.      setwallcel(switch, 2);
  63.      movetoframe(door1, 1, 3);
  64.      movetoframe(door2, 1, 3);
  65.      settimerEX(8, 1, 0, 0);
  66.      return;
  67.      
  68.  
  69.      
  70.      
  71.           
  72.  
  73.  
  74.                  
  75. end
  76.  
  77.