Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Different Item Pickup sounds. Zdoom.

Recommended Posts

I have been working on my first Zdoom wad with scripting. Doomed Space Wars.

I obviously figured out how to change the music when walking over a linedef, etc. But is there any way I can change the sounds for item pickups. Say each item (like a certain Shell box) has 80 script execute action in them which executes a script to play a different sound on pickup.

Share this post

Link to post

There's a much better solution - DECORATE. Just define a new class of ammo pickup which behaves the same like the original, but has a different pickup sound. Put a piece of code like this into a text-based DECORATE lump and put it in your wad:

actor ShellBox2 : ShellBox 14891 {          // New thing derived from ShellBox, new editor number
  Inventory.PickupSound "my_pickup_sound"   // New pickup sound
You'll be able to put the box into your map as a thing with editor number 14891. If you were mapping in Hexen/UDMF format, you'd see the entry by its name in a Decorate thing category, and select it easier, but the number is always enough.

Note that to define the sound, you'd probably also need a custom SNDINFO lump in your wad, with a definition like this:
my_pickup_sound PICKUP2                     // PICKUP2 is the actual name of the sound inside the wad

EDIT: I assumed that you actually wanted different versions of Shell boxes with different pickup sounds in the same wad, if I misunderstood and you wanted it to be a dynamic change, say so.

Share this post

Link to post

The one thing about the above tutorial that I would change is adding "Replaces ShellBox" instead of a new DoomEdNum, that way you don't have to go through the trouble of selecting the custom version of the same actor every time.

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now