Does Door_AnimatedClose work?

Thu Oct 21, 2021 3:34 pm

I have been trying to get Door_AnimatedClose to work both from a script and by putting it directly on a line but I can't seem to get it to do anything.

I have several animated doors set up and they work just fine under normal circumstances, but I wanted one particular door to open and then remain open until I closed it much later on with a script. Unfortunately, I can't get that working.

If I first open an animated door*, then try the above, the door stays open. If I create an open door, then it won't be set up properly because an animated door needs to have a 0 height when it is set up otherwise the textures appear on the upper side instead of the middle.

*When I say open a door, the only way I can do this is by using Door_Animated with a 0 duration for delay because there isn't a Door_AnimatedOpen special. So perhaps the problem is that the door is stuck open because it is waiting for an infinite delay before it can do something else?

Re: Does Door_AnimatedClose work?

Fri Oct 22, 2021 4:46 am

The attached illustrates my problem.

The door on the left is using line specials only. [Use] the door and it should open (and stay open). Go through and then try the open door from the other side. This side has been given special 274 and by my reading of things should close the door. It doesn't.

The door on the right opens by an open script and the switch, I think, should close it.

Neither setup allows the door to be shut.

Am I doing it wrong or is there a problem elsewhere?

Map in UDMF format - replaces MAP02 of Strife (i.e. just load into Strife and start a new game).

[edit] Map removed because a better on has been posted here: viewtopic.php?f=15&t=73646 [/edit]

Re: Does Door_AnimatedClose work?

Fri Oct 22, 2021 5:04 am

From reading the source, and if I got this right, if the delay is 0, the thinker, which is responsible for opening and closing the door, gets destroyed once the door is fully opened, which means the door cannot be closed late on by an outside action.

Another thing, while the door is open and waiting to close (delay is higher than 0), executing Door_Animated or Door_AnimatedClose appears to do the same thing, that is closing the door.

Re: Does Door_AnimatedClose work?

Fri Oct 22, 2021 7:33 am

Hmmm... yes, you are correct. Setting the delay parameter on the doors in the demo map to a long value (long enough to give me time to activate the closing action) allows both versions of the door to be closed by their respective closing methods.

So, I guess what we really need is a Door_AnimatedOpen special that doesn't destroy the thinker and therefore allows Door_AnimatedClose to work?

I'll post a feature suggestion. Thanks.

[edit] And done viewtopic.php?f=15&t=73646 Updated map added to that thread, so the one in this thread has been removed. [/edit]

Re: Does Door_AnimatedClose work?

Fri Oct 22, 2021 9:06 am

Alternatively, Door_AnimatedClose could be made to recreate a thinker if none exist, allowing it to work with Door_Animated doors.

Re: Does Door_AnimatedClose work?

Fri Oct 22, 2021 9:21 am

Either solution works for me. :D