How to add(not change) new sounds with SNDINFO
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.
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: 100
- Joined: Mon Sep 05, 2011 10:22 pm
How to add(not change) new sounds with SNDINFO
Hi, I would like to add about 5 new sounds to a wad that I'm making. The idea is to have these sounds be played at certain key points in the level. When the player crosses a certain line, 80(ACS_Execute) would be triggered, and the script would call PlaySound in order to play the new sound. I added the sound files to my wad, gave them all 8-character names, but the script will not compile. I believe that this is because the PlaySound function is looking for a sound that is defined in SNDINFO. I don't want to replace an existing sound, I want to add completely new sounds and define them somehow in SNDINFO so that PlaySound will be able to access the sound and the script will compile. Is this possible and can anyone help? Thanks!
-
-
- Posts: 26472
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland
Re: How to add(not change) new sounds with SNDINFO
Put your sound in the file (let's say it's called MEH1) and then give it a name in SNDINFO
SNDINFO
ACS
Or, if you just want the sound to be heard by the player who activates the script:
SNDINFO
Code: Select all
Stormwalker1 MEH1
Code: Select all
ambientsound ("Stormwalker1", 127);
Code: Select all
localambientsound ("Stormwalker1", 127);
-
- Posts: 100
- Joined: Mon Sep 05, 2011 10:22 pm
Re: How to add(not change) new sounds with SNDINFO
Worked flawlessly. Thanks Enjay!
-
-
- Posts: 26472
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland