home *** CD-ROM | disk | FTP | other *** search
- #
- # Droids Cog Script
- #
- # 00_t_inventory.cog
- #
- # bin 27 gear, this number can be changed. Right now, it's Doug's large gear bin number.
- # Desc:
- #
- #
- # 03/09/98 [JP] Created
- #
- # <C> 1998 LucasLearningLimited. All Rights Reserved--------------------------------------------------------------------------------
-
- symbols
-
- message pulse
- message blocked
- message startup
- message used
- message taken
- message entered
-
- template bigtemplate
- template smalltemplate
-
- sector attachbig
- sector attachsmall
-
- sector left linkid=4
- sector right
-
- thing ghostbig linkid=5
- thing ghostsmall linkid=6
-
- int bin=27
- int bin2=25
- int part_id=0 local
- int big_spindle_i linkid=5 local
- int small_spindle_i linkid=6 local
- int xrotate local
-
- sound gearon=swt9gearon.wav local
- sound gearoff=swtt9gearoff.wav local
- sound turnfree=mcht9motfree.wav local
- sound turnwithgear=mcht9motstrss.wav local
- end
-
-
-
-
- ##code section
- code
-
- startup:
- sleep(5);
- print("is this on?");
- //player=getlocalplayerthing();
- xrotate=0;
- return;
-
- used:
- print("used");
- printint (dwGetActivateBin());
- if (xrotate == 0)
- {
- if (getinv(getlocalplayerthing(), dwGetActivatebin()) > 0)
- {
- printint (getthingsector(getlocalplayerthing()));
- if (getthingsector(getlocalplayerthing()) == left)
- {
- print("big attached in left");
- call handle_big;
- }
- }
- }
- return;
-
- taken:
- print("taken");
- if (GetSenderId()==4);
- {
- if (getthingsector(getlocalplayerthing()) ==left)
- {
- if (big_spindle_i != 0);
- {
- ChangeInv(getlocalplayerthing(), big_spindle_i, 1);
- destroything(big_spindle_i);
- big_spindle =0;
- call update_bins;
- }
-
- }
-
- }
-
- return;
-
- update_bins:
- print("update_bins");
- if (getinv(getlocalplayerthing(), bin) > 0) SetInvAvailable(getlocalplayerthing(), bin, 1);
- else SetInvAvailable(getlocalplayerthing(), bin, 0);
- playsoundlocal(gearoff, 1, 0, 0);
- return;
-
- handle_big:
- print("handlebig");
- if (big_spindle==0)
- {
-
- if (dwGetActivateBin() = bin)
- {
- big_spindle = dwGetActivateBin();
- print ("big gear on!");
- big_spindle_i = creatething (bigtemplate, ghostbig);
- capturething(big_spindle_i);
- ChangeInv(getlocalplayerthing(), big_spindle, -1);
- playsoundlocal(gearon, 1, 0, 0);
- }
-
- }
-
- return;
-
- end
-
-
-
-
-
-
-
-