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 pulse
-
- sector finishsector
- sound goalsound=00tAccomplish.wav local
-
- int undertimelimit local
- end
-
- ## Code Section
- code
-
- startup:
- player=getlocalplayerthing();
- playermass=(getthingmass(player)/2.2);
- undertimelimit=1;
- if (getdifficulty()==1) {
- if (dwCheckDroidCaps(8)==0) SetInv(player, 2, 0); // not a biped?
- else SetInv(player, 2, 1);
- }
- if ((getdifficulty()==2)||(getdifficulty()==0)) {
- if (dwCheckDroidCaps(524288)==0) {
- SetInv(player, 2, 0); //2:tractor tread
- }
- else {
- SetInv(player, 2, 1);
- }
- }
- if (getdifficulty()==2) {
- if (playermass<200) setinv(player, 5, 1);
- else setinv(player, 5,0);
- SetTimer(180);
- }
- if (dwcheckDroidCaps(1048576)==0) setinv(player, 3, 0);
- else setinv(player, 3, 1);
- return;
-
-
- timer:
- print("times up!");
- undertimelimit=0;
- return;
-
-
-
- shutdown:
- if ((getdifficulty()==0)||(getdifficulty()==1)||(getdifficulty()==2)) {
- if (getthingsector(player)==finishsector) {
- SetInv(player, 1, 1); //1:finished the level
- }
- }
- if (getdifficulty()==2) {
- if ( (undertimelimit==1)&&(getthingsector(player)==finishsector) ) SetInv(player, 4,1); //4:Under five min.
-
- }
- return;
-
-
-
-
- end
-
-
-
-
-