scripting, acs terminate does nothing?

I'm trying to make a sector in which there is a glowing red light, and then I flip a switch and everything goes back to normal, but when I flip the switch, nothing happens. I've fiddled with all kinds of commands, all to no avail. The script below is far from what I started with. What kind of command can I use? Here is the script:

script 2 (void)
{
sector_setcolor (2, 255, 15, 15);
Light_Glow (2, 220, 120, 24);
}


script 4 Open
{
ACS_Execute (2, 0);
}

script 5 (void)
{
ACS_Terminate (2, 0);
Light_ChangeToValue (2, 192);
}

Share this post


Link to post

I'm guessing you can't stop script 2 because it isn't running at the time, the two effects are applied at first execution and the script is done. Perhaps in script 5 you could set a new Light_Glow to 192 min 192 max and a new sector color to whatever is the norm.

Share this post


Link to post
Phml said:

I'm guessing you can't stop script 2 because it isn't running at the time, .....

Exactly

96riv said:

.... but when I flip the switch, nothing happens. .


You could try something like this

#include "zcommon.acs"

script 2 (void) // cross a linedef
 {
 
   Sector_SetColor ( 2, 255, 15, 15 );
   Light_Glow ( 2, 220, 120, 48 );
 
 }


script 3 (void) // activate switch
 {
 
   Sector_SetColor ( 2, 255, 255, 255 );
   Light_Stop ( 2 );
   Light_ChangeToValue (2, 192);
 
 }

Share this post


Link to post

That's worked, thanks! I had a different layout originally, and when that didn't work, I screwed it up beyond recognition.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now