home *** CD-ROM | disk | FTP | other *** search
- symbols
- message startup
- message taken
- message used
- message pulse
- message activate
- message arrived
- message user0
-
- thing elevator linkid=3
- thing ghostdeliver mask=0x100
- thing ghostpickup mask=0x100
- thing PMN linkid=5
- thing PMN2 local
-
- sector ds1
- sector ds2
-
- template phrikT
-
- surface conveyor nolink
- surface conveyorA nolink
- surface conveyor2 nolink
- surface conveyor2a nolink
- surface conveyor2b nolink
- surface xtracon nolink
-
- vector conVector
- vector conVector2
-
- cog fittocog
- cog animcog
- int okaytopickup=1 local
- sound takesound=NRG00MgntSck.wav local
- end
-
-
-
- code
-
- user0:
- sendmessage(animcog, user0);
- Mcount=0;
- slidewall(conveyor, conVector, 3);
- slidewall(conveyorA, conVector, 3);
- slidewall(conveyor2, conVector2, 3);
- slidewall(conveyor2a, conVector2, 3);
- slidewall(conveyor2b, conVector2, 3);
- slidewall(xtracon, convector, 3);
- player=getlocalplayerthing();
- call createPMN;
- okaytopickup=1;
- return;
-
- used:
- print("used");
- // print("activate bin=");
- // printint(dwGetActivateBin());
- if (getsenderid()==3) {
- if ( (getinv(player, dwGetActivateBin() ) >0)&&(dwgetactivatebin()==32) ) {
- okaytopickup=0;
- PMN2=creatething(PhrikT, ghostdeliver);
- capturething(PMN2);
- changeInv(player, 32, -1);
- SetInvAvailable(player, 32, 0);
- setpulse(1);
- sleep(0.5);
- movetoframe(elevator, 1, 1);
- movetoframe(PMN2, 1, 1);
- Mcount=Mcount+1;
- if (Mcount==3) {
- sendmessage(Fittocog, user5);
- dwplaycammyspeech(16018, "m2ca018.wav", 20, 2);
- }
- else if (Mcount==1) {
- dwplaycammyspeech(16017, "m2ca017.wav", 20, 2);
- }
- }
- }
- return;
-
-
-
- taken:
- print("trying to take");
- if (getsenderid()==3) return;
- if (okaytopickup==0) return;
- if (dwGetArmStrength() > 6) {
- if (Mcount==0) dwplaycammyspeech(16021, "m2ca021.wav", 20, 2);
- else playsoundlocal(takesound, 1.0, 0.0, -1);
- print("taken");
- dwFlashInventory();
- destroything(PMN);
- SetInvAvailable(player, 32, 1);
- changeInv(player, 32, 1);
- }
- else {
- print("you're not strong enough to pick that up!");
- dwplaycammyspeech(16022, "m2ca022.wav", 20, 2);
- }
- return;
-
- createPMN:
- PMN=creatething(PhrikT, ghostpickup);
- capturething(PMN);
- movetoframe(PMN, 2, 3);
- setpulse(1);
- return;
-
- arrived:
- if (getcurframe(PMN)==2) movetoframe(PMN, 3, 30);
- return;
-
-
- pulse:
- if (getthingsector(PMN)==ds1) {
- print("destroying original PMN");
- destroything(PMN);
- call createPMN;
- }
- else if (getthingsector(PMN2)==ds2) {
- destroything(PMN2);
- movetoframe(elevator, 0, 20);
- if (Mcount==3) setpulse(0);
- else call createPMN;
- okaytopickup=1;
- }
- return;
-
- end
-