GZDoom Builder - Poly object doors stay open?
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.
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.
GZDoom Builder - Poly object doors stay open?
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.
- 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?
Give a long delay in a script, for example
That way, the gaming session will be finished long before the door would close.
Code: Select all
#include "zcommon.acs"
// 8:Polyobj_DoorSlide (po, speed, angle, dist, delay);
script 1 (void)
{
Polyobj_DoorSlide (2, 16, 0, 176, 0x7fffffff);
}
Re: GZDoom Builder - Poly object doors stay open?
[wiki]Polyobj_Move[/wiki] (line type 4) does this anyway.
- 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?
Unless somebody is persistent enough to have the game running for almost two years non-stop just to see it close.Kappes Buur wrote:Give a long delay in a script, for example
That way, the gaming session will be finished long before the door would close.Code: Select all
#include "zcommon.acs" // 8:Polyobj_DoorSlide (po, speed, angle, dist, delay); script 1 (void) { Polyobj_DoorSlide (2, 16, 0, 176, 0x7fffffff); }
Then again, wouldn't a delay of 0 make it stay open forever? Or does that not work in the case of Polyobj_DoorSlide?
- 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?
In the case of Polyobj_DoorSlide, a delay of 0 closes the door immediately.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?
So, to keep the door open,
- either use Polyobj_DoorSlide with a long delay,
or use Polyobj_Move.
Re: GZDoom Builder - Poly object doors stay open?
Polyobj_Move is better imo. Setting up the same as the slide action will do it.
Re: GZDoom Builder - Poly object doors stay open?
Don't need no additional code or script, I just typed 999999 in the tic delay line. Works perfect enough for me.leodoom85 wrote:Polyobj_Move is better imo. Setting up the same as the slide action will do it.
Re: GZDoom Builder - Poly object doors stay open?
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).
Re: GZDoom Builder - Poly object doors stay open?
I know. I just use the swing door action. and use those numbers in delay.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).
Re: GZDoom Builder - Poly object doors stay open?
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
To make Polyobj_DoorSlide doors stay open, use a delay of -1