home *** CD-ROM | disk | FTP | other *** search
- symbols
- message startup
- message arrived
- message activate
-
- thing baffle1 linkid=1
- thing baffle2 linkid=2
- thing baffle3 linkid=3
-
- int count1=0 local
- int count2=0 local
- int count3=0 local
-
- cog baffleMcog
-
-
- sound bafflewav=swt02baffle.wav
-
- end
-
- code
- startup:
- player=getlocalplayerthing();
- count1=0;
- count2=0;
- count3=0;
- return;
-
- arrived:
- if (getsenderid()==1) {
- count1=count1+1;
- if (count1%12==0) jumptoframe(baffle1, 0, getthingsector(baffle1));
- }
- else if (getsenderid()==2) {
- count2=count2+1;
- if (count2%12==0) jumptoframe(baffle2, 0, getthingsector(baffle2));
- }
- else if (getsenderid()==3) {
- count3=count3+1;
- if (count3%12==0) jumptoframe(baffle3, 0, getthingsector(baffle3));
- }
- call onlinestatus;
- return;
-
- onlinestatus:
- if ( ((count1-3)%12==0)&&((count2-3)%12==0)&&((count3-3)%12==0) ) {
- sendmessage(baffleMcog, user4); //generator three online
- }
- else sendmessage(baffleMcog, user5); //generator three OFFLINE
- return;
-
-
- activate:
- if (dwGetArmStrength() < 7) {
- dwplaycammyspeech(16022, "t3ca008.wav", 20, 2);
- return;
- }
- if (getsenderid()==1) {
- if (ismoving(baffle1)!=0) return;
- else rotatepivot(baffle1, 1, 1);
- playsoundthing(bafflewav, baffle1, 1.0, -1, -1, 0);
- }
- else if (getsenderid()==2) {
-
- if (ismoving(baffle2)!=0) return;
- else {
- rotatepivot(baffle1, 1, 1);
- rotatepivot(baffle2, 1, 0.9);
- playsoundthing(bafflewav, baffle2, 1.0, -1, -1, 0);
- }
- }
- else if (getsenderid()==3) {
- if (ismoving(baffle3)!=0) return;
- else {
- rotatepivot(baffle1, 1, 1);
- rotatepivot(baffle2, 1, 0.9);
- rotatepivot(baffle3, 1, 0.95);
- playsoundthing(bafflewav, baffle2, 1.0, -1, -1, 0);
- }
- }
-
-
- return;
-
- end
-
-
-
-