Hi, first time being here and first time trying to mod and map for zdoom
I used to map something for Duke Nukem 3d so I am confused about a few things.
One in particular it's odd for me
I saw there are special actions to open a door, to close a door etc...
But there is no really way to use the same Special action on a linedef to open OR close a door? For example the first time I press the use action, the door opens, the second time the door closes...and so on
I could understand that maybe it's a engine limitation (after all doors and lift are configured with a delay in Doom) but there is no way to accomplish this on UDMF maps, without using Zscript?
Special action for open OR close a door
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.
-
- Posts: 19
- Joined: Sat Apr 22, 2023 10:47 am
- Preferred Pronouns: He/Him
-
-
- Posts: 17901
- Joined: Fri Jul 06, 2007 3:22 pm
Re: Special action for open OR close a door
Indeed, IIRC only the local door actions (when you directly activate the door, rather than opening it remotely through a switch) can be retriggered to open/close/open/close etc.
You can also use ACS for this kind of things, it has wider compatibility than ZScript (e.g. your map can also work in Zandronum).
You can also use ACS for this kind of things, it has wider compatibility than ZScript (e.g. your map can also work in Zandronum).
-
- Posts: 19
- Joined: Sat Apr 22, 2023 10:47 am
- Preferred Pronouns: He/Him
Re: Special action for open OR close a door
Gez wrote:
> Indeed, IIRC only the local door actions (when you directly activate the
> door, rather than opening it remotely through a switch) can be retriggered
> to open/close/open/close etc.
>
> You can also use ACS for this kind of things, it has wider compatibility
> than ZScript (e.g. your map can also work in Zandronum).
Ok but what about remotely, like using a switch?
> Indeed, IIRC only the local door actions (when you directly activate the
> door, rather than opening it remotely through a switch) can be retriggered
> to open/close/open/close etc.
>
> You can also use ACS for this kind of things, it has wider compatibility
> than ZScript (e.g. your map can also work in Zandronum).
Ok but what about remotely, like using a switch?
-
-
- Posts: 17901
- Joined: Fri Jul 06, 2007 3:22 pm
Re: Special action for open OR close a door
Remote use is when you'd want to use a script. Out of the box, it's only local doors (without tags) that can be closed and reopened without waiting.
Source code for the curious (C++, not ZScript or ACS, don't try putting this in your mods).
Without using a script, a particularly janky workaround would be to have a invisible door (thanks to transfer heights?) in front of your switch, so that you actually move the invisible door, and the remote door is attached to this invisible door so it follows the same movement. Sounds awful.
Source code for the curious (C++, not ZScript or ACS, don't try putting this in your mods).
Spoiler:As you can see, the only case where the door's existing thinker can be overridden is when tag == 0, meaning this cannot be used on a remote door.
Without using a script, a particularly janky workaround would be to have a invisible door (thanks to transfer heights?) in front of your switch, so that you actually move the invisible door, and the remote door is attached to this invisible door so it follows the same movement. Sounds awful.