- in library script:
- _______________________________________________
- int inspace;
- int SpacesuitIntegrity=10;
- script 850 (void)
- {
- if(inspace)
- {
- SetHudSize(320,200,1);
- SetFont("SMALLFONT");
- if(SpacesuitIntegrity>0){hudmessage(s:"Suit Integrity: ",d:SpacesuitIntegrity;hudmsg_plain, 30, CR_UNTRANSLATED, 160.4, 160.0,0);}
- int suithealth;
- int suithealth2;
- SetFont("SPACEST1");
- hudmessage(s:"A";hudmsg_plain, 1003, CR_UNTRANSLATED, 160.4, 100.0,0);
- suithealth=GetActorProperty(1000,APROP_Health);
- suithealth2=GetActorProperty(1000,APROP_Health);
- delay(5);
- suithealth2=GetActorProperty(1000,APROP_Health);
- if(suithealth2<suithealth) { SpacesuitIntegrity-=1; }
- if(SpacesuitIntegrity<=0)
- {
- acs_execute(851,0,0,0,0);
- }
- }
- else
- {
- if(SpacesuitIntegrity>0)
- {
- acs_execute(851,0,0,0,0);
- }
- }
- delay(1);
- restart;
- }
- script 851 (void)
- {
- if(SpacesuitIntegrity>0)
- {
- hudmessage(s:"";hudmsg_plain, 1003, CR_UNTRANSLATED, 0.0, 0.0, 0);
- hudmessage(s:"";hudmsg_plain, 30, CR_UNTRANSLATED, 0.0, 0.0, 0);
- hudmessage(s:"";hudmsg_plain, 31, CR_UNTRANSLATED, 0.0, 0.0, 0);
- terminate;
- }
- SetHudSize(320,200,1);
- SetFont("SMALLFONT");
- while(SpacesuitIntegrity<=0)
- {
- if(!inspace)
- {
- if(SpacesuitIntegrity>0) { terminate; }
- hudmessage(s:"Suit Integrity Recovering";hudmsg_plain, 30, CR_UNTRANSLATED , 160.4, 160.0,0);
- hudmessage(s:"";hudmsg_plain, 31, CR_UNTRANSLATED , 160.4, 170.0,0);
- delay(35);
- hudmessage(s:"";hudmsg_plain, 1003, CR_UNTRANSLATED, 0.0, 0.0, 0);
- hudmessage(s:"";hudmsg_plain, 30, CR_UNTRANSLATED, 0.0, 0.0, 0);
- hudmessage(s:"";hudmsg_plain, 31, CR_UNTRANSLATED, 0.0, 0.0, 0);
- SpacesuitIntegrity=10;
- terminate;
- }
- hudmessage(s:"Suit Integrity: 0";hudmsg_plain, 30, CR_YELLOW, 160.4, 160.0,0);
- hudmessage(s:"Warning: BREACHED SUIT";hudmsg_plain, 31, CR_YELLOW, 160.4, 170.0,0);
- delay(5);
- hudmessage(s:"Suit Integrity: 0";hudmsg_plain, 30, CR_ORANGE, 160.4, 160.0,0);
- hudmessage(s:"Warning: BREACHED SUIT";hudmsg_plain, 31, CR_ORANGE, 160.4, 170.0,0);
- delay(5);
- hudmessage(s:"Suit Integrity: 0";hudmsg_plain, 30, CR_RED, 160.4, 160.0,0);
- hudmessage(s:"Warning: BREACHED SUIT";hudmsg_plain, 31, CR_RED, 160.4, 170.0,0);
- delay(5);
- hudmessage(s:"Suit Integrity: 0";hudmsg_plain, 30, CR_DARKRED , 160.4, 160.0,0);
- hudmessage(s:"Warning: BREACHED SUIT";hudmsg_plain, 31, CR_DARKRED , 160.4, 170.0,0);
- delay(5);
- hudmessage(s:"Suit Integrity: 0";hudmsg_plain, 30, CR_RED , 160.4, 160.0,0);
- hudmessage(s:"Warning: BREACHED SUIT";hudmsg_plain, 31, CR_RED , 160.4, 170.0,0);
- delay(5);
- hudmessage(s:"Suit Integrity: 0";hudmsg_plain, 30, CR_ORANGE, 160.4, 160.0,0);
- hudmessage(s:"Warning: BREACHED SUIT";hudmsg_plain, 31, CR_ORANGE, 160.4, 170.0,0);
- delay(5);
- damagething(5);
- }
- }
- _______________________________________________
- in map script:
- _______________________________________________
- int airlocktoggle;
- script 10 (int mode) //airlock to outside
- {
- if(airlocktoggle)
- {
- door_close(22,64);
- delay(35*1);
- sector_setcolor(23,255,0,0);
- inspace=0;
- delay(35*2);
- sector_setcolor(23,255,255,255);
- delay(35*1);
- door_open(21,64);
- airlocktoggle=0;
- }
- else
- {
- door_close(21,64);
- delay(35*1);
- sector_setcolor(23,255,0,0);
- inspace=1;
- delay(35*2);
- sector_setcolor(23,255,255,255);
- delay(35*1);
- door_open(22,64);
- airlocktoggle=1;
- }
- }
