home *** CD-ROM | disk | FTP | other *** search
- # Jedi Knight Cog Script
- #
- # 00_Door.cog
- #
- # Generic Door Script
- #
- # [IS]
- #
- # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
- # ========================================================================================
-
- symbols
- message user1
- message arrived
- message timer
-
- thing waterA1 linkid=0 mask=0x405
- thing waterA2 linkid=1 mask=0x405
-
- thing waterB1 linkid=3
- thing waterB4
-
- thing camera2
-
- float moveSpeed=0.5
- float sleepTime=2.0
- float lightValue=0.5
-
- int numDoors=0 local
- int doorStatus local
- int moveStatus local
- int i local
- thing water1 local
- thing water2 linkid=3
-
- template octogon
- cog watermove3 //tells watermove3cog to show h20 at right time
- sound drain=wtr03wtrdrn.wav local
- sound drains=wtr00tlp09.wav local
-
- end
-
- # ========================================================================================
-
- code
-
- user1:
- // setcamerafocii(2, waterA1, camera2);
- Sleep(0.5);
- setcamerafocus(0, camera2);
- setcurrentcamera(0);
- dwfreezeplayer();
- // movetoframe(camera2, 1, 1);
- water1=creatething(octogon, waterA1);
- water2=creatething(octogon, waterB1);
- //dwplaycammyspeech(16030, "M3CA025.wav", 5, 2); //water's draining from tank!
- print("create");
- capturething(water1);
- capturething(water2);
- print("capture");
- MoveToFrame(water1, 1, .5); //was waterA1
- MoveToFrame(water2, 1, .3); //was wateB1
- //draini=playsoundthing(drain, water1, 1, -1, -1, 0x1);
- draini=playsoundlocal(drain, 1, 0, 0x1);
- drainsi=playsoundlocal(drains, 1, 0, 0x1);
- print("move");
- MoveToFrame(camera2, 1, .5);
- settimer(13);
- sleep(6);
- dwplaycammyspeech(16030, "M3CA025.wav", 5, 2); //water's draining from tank!
- return;
-
- //timer:
- //movetoframe(camera2, 1, 3);
- //return;
-
- timer:
- print("arrived");
- destroything(water1); //get rid of this 3do //waterA1
- destroything(water2); //get rid of this 3do //waterB1
- dwunfreezeplayer();
- setcurrentcamera(7); //return camera to normal
- sendmessage(watermove3, user1); //tells tanks2cog to show water at right time
- print("messages");
- stopsound(draini, 3);
- stopsound(drainsi, 3);
-
- return;
-
-
-
-
- end
-
-