[UDMF] SNDSEQ: Different sounds for Move (NOT Door)

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.
User avatar
MartinHowe
Posts: 2050
Joined: Mon Aug 11, 2003 1:50 pm
Location: Waveney, United Kingdom

[UDMF] SNDSEQ: Different sounds for Move (NOT Door)

Post by MartinHowe »

Setting up a poly object sliding door as a door with Polyobj_DoorSlide and with the sounds and sequence as per the Wiki article, works fine.

However I want the player to be able to open and close the door at will, without waiting for the poly object to return. Polyobj_Move, in a script that remembers whether the door is open or not, works fine; however, it seems one can only have one sound sequence for a move operation, as opposed to a door operation. This is because the start line only allows one sound to be set. You'd think that special would contain only static, immutable properties of the poly object and indeed, that special cannot be modified one the map is loaded. So the sound should be in the move or door function call; but it seems that isn't the case.

I can hack around it by putting a map spot, in the gap where the poly object goes, and playing the sound via the script; but that is rather hacky.

So my question is: is there an official way to do this?
scalelaveer
Posts: 1
Joined: Wed Jan 01, 2025 9:40 pm
Operating System Version (Optional): Windows 11
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: [UDMF] SNDSEQ: Different sounds for Move (NOT Door)

Post by scalelaveer »

MartinHowe wrote: Fri May 03, 2024 3:36 pm Setting up a poly object sliding door as a door with Polyobj_DoorSlide and with the sounds and sequence as per the Wiki article, works fine.

However I want the player to be able to open and close the door at will, without waiting for the poly object to return. Polyobj_Move, in a script that remembers whether the door is open or not, works fine; however, it seems one can only have one sound sequence for a move operation, as opposed to a door operation. This is because the start line only allows one sound to be set. You'd think that special would contain only static, immutable properties of the poly object and indeed, that special cannot be modified one the map is loaded. So the sound should be in the move or door function call; but it seems that isn't the case.

I can hack around it by putting a map spot, in the gap where the poly object goes, and playing the sound via the script; but that is rather hacky.

So my question is: is there an official way to do this?
There isn’t an official way to set different sounds for Polyobj_Move operations dynamically. The suggested workaround is scripting the sound separately using a map spot, as you've described. While it may seem hacky, it’s currently the most practical approach within the engine’s limitations.
boris
Posts: 756
Joined: Tue Jul 15, 2003 3:37 pm

Re: [UDMF] SNDSEQ: Different sounds for Move (NOT Door)

Post by boris »

Instead of trying some ACS bullshittery you could have a look at the ZPolyobject library. That'll require some custom ZScript coding on your side, though.
User avatar
MartinHowe
Posts: 2050
Joined: Mon Aug 11, 2003 1:50 pm
Location: Waveney, United Kingdom

Re: [UDMF] SNDSEQ: Different sounds for Move (NOT Door)

Post by MartinHowe »

Not sure what promoted the necroposting, but thanks all the same :) Due to ill health, I haven't worked on the mod for a few months, but when resuming, I'll look into this :thumb:

Return to “Mapping”