home *** CD-ROM | disk | FTP | other *** search
- # Droids Cog Script
- #
- # D0_skyway.cog
- #
- # Skyways cog
- #
- #
- #
- #
- #
- # [MT]
- #
- #
- # (C) 1997 LucasLearningLimited. All Rights Reserved
-
-
-
- symbols
- message startup
- message shutdown
- message timer
- message entered
-
- sector finishsector mask=0xffff linkid=1
-
- thing crate0
- thing crate1
-
- sound goalsound=00tAccomplish.wav local
-
- int undertimelimit local
-
- end
-
- ## Code Section
- code
-
- startup:
- player=getlocalplayerthing();
- crateisthrudoor=0;
- undertimelimit=1;
- if (getdifficulty()==0) {
- if (dwCheckDroidCaps(524288)!=0) SetInv(player, 2, 1);
- }
- if (getdifficulty()==1) {
- if (dwCheckDroidCaps(8)!=0) SetInv(player, 2, 1); //2:biped
- else SetInv(player, 2, 0);
- }
- else if (getdifficulty()==2) {
- setTimer(240);
- if (dwCheckDroidCaps(524288)!=0) SetInv(player, 2, 1); //3:tractor tread
- else SetInv(player, 2, 0);
- }
- return;
-
- entered:
- if (getsenderid()==1) {
- if ( (getsourceref()==crate0)||(getsourceref()==crate1) ) {
- print("Back with one of those block rockin' beats!");
- setinv(player, 3, 1);
- }
- }
- return;
-
-
- shutdown:
- if ((getdifficulty()==0)||(getdifficulty()==1)||(getdifficulty()==2)) {
- if (getthingsector(player)==finishsector) {
- SetInv(player, 1, 1); //1:finished the level
- }
- else SetInv(player,1,0);
- }
- if (getdifficulty()==2) {
- if ( (undertimelimit==1)&&(getthingsector(player)==finishsector) ) SetInv(player, 4,1); //4:Under three min.
- else SetInv(player, 3, 0);
- }
- return;
-
-
- timer:
- undertimelimit=0;
- print("you're all out of time");
- return;
-
-
-
- end
-
-
-
-
-