GZDoom Builder - Poly object doors stay open?

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Post Reply
User avatar
Graaicko
Posts: 534
Joined: Tue Jun 17, 2014 11:22 pm
Graphics Processor: nVidia (Legacy GZDoom)

GZDoom Builder - Poly object doors stay open?

Post by Graaicko »

Was wondering how to make poly object doors stay open? I have sliding and swinging doors throughout a map I'm creating. the exit door is switch activated, so I need it to stay open.
User avatar
Kappes Buur
 
 
Posts: 4188
Joined: Thu Jul 17, 2003 12:19 am
Graphics Processor: nVidia (Legacy GZDoom)
Location: British Columbia, Canada
Contact:

Re: GZDoom Builder - Poly object doors stay open?

Post by Kappes Buur »

Give a long delay in a script, for example

Code: Select all

#include "zcommon.acs"

//  8:Polyobj_DoorSlide (po, speed, angle, dist, delay);

script 1 (void)
{
    Polyobj_DoorSlide (2, 16, 0, 176, 0x7fffffff);
}
That way, the gaming session will be finished long before the door would close.
User avatar
Enjay
 
 
Posts: 27148
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: GZDoom Builder - Poly object doors stay open?

Post by Enjay »

[wiki]Polyobj_Move[/wiki] (line type 4) does this anyway.
User avatar
MFG38
Posts: 414
Joined: Sun Apr 14, 2019 8:26 am
Graphics Processor: nVidia (Modern GZDoom)
Location: Finland
Contact:

Re: GZDoom Builder - Poly object doors stay open?

Post by MFG38 »

Kappes Buur wrote:Give a long delay in a script, for example

Code: Select all

#include "zcommon.acs"

//  8:Polyobj_DoorSlide (po, speed, angle, dist, delay);

script 1 (void)
{
    Polyobj_DoorSlide (2, 16, 0, 176, 0x7fffffff);
}
That way, the gaming session will be finished long before the door would close.
Unless somebody is persistent enough to have the game running for almost two years non-stop just to see it close.

Then again, wouldn't a delay of 0 make it stay open forever? Or does that not work in the case of Polyobj_DoorSlide?
User avatar
Kappes Buur
 
 
Posts: 4188
Joined: Thu Jul 17, 2003 12:19 am
Graphics Processor: nVidia (Legacy GZDoom)
Location: British Columbia, Canada
Contact:

Re: GZDoom Builder - Poly object doors stay open?

Post by Kappes Buur »

MFG38 wrote: Then again, wouldn't a delay of 0 make it stay open forever? Or does that not work in the case of Polyobj_DoorSlide?
In the case of Polyobj_DoorSlide, a delay of 0 closes the door immediately.

So, to keep the door open,
  • either use Polyobj_DoorSlide with a long delay,
    or use Polyobj_Move.
User avatar
leodoom85
Posts: 684
Joined: Sun Sep 14, 2014 6:40 pm
Location: Earth-shaking Chile

Re: GZDoom Builder - Poly object doors stay open?

Post by leodoom85 »

Polyobj_Move is better imo. Setting up the same as the slide action will do it.
User avatar
Graaicko
Posts: 534
Joined: Tue Jun 17, 2014 11:22 pm
Graphics Processor: nVidia (Legacy GZDoom)

Re: GZDoom Builder - Poly object doors stay open?

Post by Graaicko »

leodoom85 wrote:Polyobj_Move is better imo. Setting up the same as the slide action will do it.
Don't need no additional code or script, I just typed 999999 in the tic delay line. Works perfect enough for me.
User avatar
Enjay
 
 
Posts: 27148
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: GZDoom Builder - Poly object doors stay open?

Post by Enjay »

Using Polyobj_Move (as per the example I posted) doesn't need a script at all. There is no script in my example PK3, I just used the built in line type (that type can be used from a script if required though).
User avatar
Graaicko
Posts: 534
Joined: Tue Jun 17, 2014 11:22 pm
Graphics Processor: nVidia (Legacy GZDoom)

Re: GZDoom Builder - Poly object doors stay open?

Post by Graaicko »

Enjay wrote:Using Polyobj_Move (as per the example I posted) doesn't need a script at all. There is no script in my example PK3, I just used the built in line type (that type can be used from a script if required though).
I know. I just use the swing door action. and use those numbers in delay.
User avatar
Urthur
Posts: 27
Joined: Wed May 30, 2018 6:19 pm

Re: GZDoom Builder - Poly object doors stay open?

Post by Urthur »

For a single use switch Polyobj_Move is probably fine. However, I found Polyobj_DoorSlide to be generally more robust because it can't be accidently activated twice if using double doors.

To make Polyobj_DoorSlide doors stay open, use a delay of -1
Post Reply

Return to “Mapping”