Page 1 of 1

A simple script is confusing sounds

Posted: Mon May 02, 2022 10:24 am
by Guest
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):

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.

Re: A simple script is confusing sounds

Posted: Mon May 02, 2022 11:36 am
by szuran
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.