Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

ACS question

Recommended Posts

I'm tying to get accustomed to ACS. I want to write a script to handle doors in an airlock - a switch would close one door, play a sound, and then open the other door.

There is a delay after pressing the switch, and then the door opens. But the other door doesn't close, and no sound plays. What am I doing wrong?

Here's a wad with the airlock.

#include "zcommon.acs"

script 1 (int opensector, int closesector)
    int speed = 16;
    int wait = 100;

Share this post

Link to post

"closesector" is the 2nd argument, so make sure you're actually setting the intended tag as 2nd argument, also if there aren't typos in variable name etc., otherwise I really don't know. How do you call the script, anyway, and from where?

Share this post

Link to post

I got it. You need to use Door_Open instead of Door_Raise, because Door_Raise with delay=0 keeps the door open forever, overriding the Door_Close function.

Also I recommend adding these two lines at the end of your script:

That will prevent undesired effects if the player triggers a switch before he should be able to. The switches will be impossible to operate until the doors fully open/close. They you won't even need those barriers in front of switches.

Share this post

Link to post

Hey, sorry about that. I think it was the problem but my attention got diverted so I didn't look very thoroughly. I'll check now if it's a solution. :)

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