I have an ACS script that runs when the player walks over a linedef that triggers a small scene. This happens when the player enters a circular room that has four entrances. It doesn't matter which entrance the player enters from, because the linedef is on each entrance. But here it my problem. I only want this script to execute ONCE. If it is activated by one entrance, I need the other three to become inactive. How can I do this with my code?
Code: Select all
script 8 (void)
{
SetPlayerProperty (0, 1, PROP_TOTALLYFROZEN);
AmbientSound("shadowconsciousness/taunt3", 127);
SpawnSpotForced("HauntDevil",2,3,0);
Sector_SetColor (3, 0, 255, 255);
Light_ChangeToValue(3, 128);
delay (200);
AmbientSound("Ghost/Scream", 127);
Thing_Remove (3);
Sector_SetColor (3, 255, 255, 255);
Light_ChangeToValue(3, 104);
delay (80);
SetPlayerProperty (0, 0, PROP_TOTALLYFROZEN);
}
That's the code, but each time I enter the area from each entrance it plays each time. I have it set to one time use, but because their are four "different" entrances it triggers each on when the player walks over it once. Please help.
Thanks in advance!