A simple script is confusing sounds

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!

Moderators: GZDoom Developers, Raze 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.

A simple script is confusing sounds

Postby Wade Goblingdad » Mon May 02, 2022 10:24 am

Hi, I have an unusual problem. I am having trouble with sounds in a simple script that should play them.

Here's the video (everything is WIP, so don't mind the look): https://www.youtube.com/watch?v=fots2BoWNI8

Here's the explanation:

1. I have 5 music files - L2MUSx, where x is the number of the music piece from 1 to 5
2. They are defined properly in SNDINFO - as you see in the video
3. They are tied to a very simple script that plays them

script "MusA" (void)

There are separate scripts (activated by different switches) for each music file.

But the game completely messes up the order of the files. Where it's supposed to play MUS1, it plays MUS2. Where it's MUS3, it plays MUS4. I checked it on 3 different computers, it's the same error everywhere.

But here's the thing: a fellow modder copy-pasted the files and the script, including SNDINFO, to his very different mod. And it works. So the files aren't corrupted, and the script checks out.

We tried a couple of things to remedy my case:
- rename the sounds
- reupload the files
- redo the script from the scratch
- move the files from the sound subfolder to the main folder
- move the files and SNDINFO to a separate wad within the pk3
- revert to gzdoom 4.5 from 4.7.1

Nothing works! And I think this is just a start of sound-related problems, because I had a file that for some reason wouldn't play at all, only if put in a sound sequence. I just left it in a sound sequence without thinking too much about it, but that should've been a red flag.

I'm afraid something really bad has happened to my mod. Please help. I will gladly share my pk3 with you if necessary.
Wade Goblingdad

Re: A simple script is confusing sounds

Postby szuran » Mon May 02, 2022 11:36 am

Hi, I am the author of this post, I didn't notice I wasn't logged in.

I found the solution. It was caused by a typo in a definition ABOVE the definition of the problematic sound. It made all the sound below it get confused in-game.
Joined: 02 May 2022

Return to Assets (and other stuff)

Who is online

Users browsing this forum: No registered users and 0 guests