pcorf Posted June 5, 2014 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. 0 Share this post Link to post
scifista42 Posted June 5, 2014 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. 0 Share this post Link to post
pcorf Posted June 5, 2014 Thanks for that. I will give it a try. I am so new to this. 0 Share this post Link to post
Linkrulezall Posted June 9, 2014 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. 0 Share this post Link to post