Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "zcommon.acs"
- #DEFINE player_MAX 64
- #DEFINE player_TID 60460
- bool PlayersPresent = false;
- int TargetTID = 0;
- //check if anybody entered the zone
- script "EnterZone" (void)
- {
- PlayersPresent = ( LineSide() == LINE_FRONT );
- if ( LineSide() == LINE_FRONT ) TargetTID = ActivatorTID();
- }
- script "PlayerTID" ENTER
- {
- Thing_ChangeTID(0, player_TID + PlayerNumber());
- }
- script "DecompressionZone" (int pdoortag, int pdoorspeed)
- {
- log(s:"ScriTpt DecompressionZone: Script executed!");
- if ( !PlayersPresent )
- terminate;
- log(s:"Script DecompressionZone: Players inside!");
- for ( int i = 0; i < player_MAX; i++ )
- {
- log(s: "Script DecompressionZone: FOR executed");
- Door_Close(pdoortag, pdoorspeed);
- Thing_Damage2(player_TID + i, 5, "Depressurization");
- if ( ClassifyActor(player_TID + i) & ACTOR_DEAD )
- {
- Door_Open(pdoortag, pdoorspeed);
- log(s:"An unsuspecting bitch was depressurized!");
- break;
- }
- else
- {
- Delay(20);
- log(s:"This should work");
- ACS_NamedExecute("DecompressionZone", 0, pdoortag, pdoorspeed);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment