Does anyone know of a simple way to manually dictate what sound channel an inventory's pickupsound is played on? I know that the default choice is the ITEM channel (understandably enough), but say for instance that I'd like the pickupsound to be a sample of the player character's voice. I would then most likely wish that sound to play on the VOICE channel, particularly to avoid it clashing with other sounds played on that channel such as cries of pain, etc., lest the player be heard talking over himself.
So far, this is the best solution I was able to come up with:
Code: Select all
ACTOR ItemGiver : CustomInventory
{
+INVENTORY.AUTOACTIVATE
Inventory.PickupSound ""
States
{
Use:
TNT1 A 0 A_PlaySound("*itempickup",CHAN_VOICE)
Stop
}
}
I then have actors inherit from this to act as pickups, and have their Pickup states give the real item (ammo, weapon, etc.), so that the player can run over it, get the true item, and play a voice sample on the VOICE channel. This is nearly a perfect solution to what I want, except for a few subtle nuances, such as the weapon pickups not being subject to certain flags/variables (weaponstay, anybody?).
Anyone know of a healthier solution than what I'm doing?