Page 1 of 1
Getting sound to complete after another started
Posted: Sat Aug 01, 2015 4:51 am
by Hardbash
How do I get my plasma rifle
(
http://www.mediafire.com/download/i60kq ... /Raily.wad)
to complete it's fire sound? It has a very fast fire rate so the "good" part of the sound effect is cut off due to the entire sound starting again.
[spoiler]ACTOR Raily : Weapon replaces Railgun
{
Weapon.SelectionOrder 30
Weapon.SlotNumber 6
Weapon.AmmoUse 1
Weapon.AmmoGive 40
Weapon.Ammotype "Cell"
Inventory.PickupMessage "New and Improved PlasmaRifle"
Tag "Plasmagun"
States
{
spawn:
GPSP A -1
Loop
ready:
GPLS A 1 A_WeaponReady
Loop
deselect:
GPLS A 1 A_Lower
Loop
select:
GPLS A 1 A_Raise
Loop
fire:
GPLS A 1
GPLS A 0 A_FireCustomMissile("fuzzyplasmo",0,1,0,0,0)
GPLS A 0 A_PlaySound("plassyshoot")
GPLS C 1
GPLS B 0
BPLS B 1
Goto Ready
}
}
actor FuzzyPlasmo : arachnotronplasma
{
speed 50
damage 7
seesound ""
deathsound "weapons/plasmax"
}[/spoiler]
I ended up replacing the SeeSound sound effect, due to it having lots of sound cutoff, with A_PlaySound.
RE: Getting sound to complete after another started
Posted: Sat Aug 01, 2015 5:07 am
by FascistCat
RE: Getting sound to complete after another started
Posted: Sat Aug 01, 2015 5:15 am
by Ænima
Move A_PlaySound to the projectile actor itself and call it from the SECOND frame of the Spawn state (remember, no actions can be called from the very first Spawn state, all you need to do is use "TNT1 A 0" as the first Spawn line and then put your frame with A_PlaySound right after it).
RE: Getting sound to complete after another started
Posted: Sat Aug 01, 2015 5:49 am
by Hardbash
Ænima wrote:
Move A_PlaySound to the projectile actor itself and call it from the SECOND frame of the Spawn state (remember, no actions can be called from the very first Spawn state, all you need to do is use "TNT1 A 0" as the first Spawn line and then put your frame with A_PlaySound right after it).
So, it'd end up looking like this?
[spoiler]actor Raily : Weapon replaces Railgun
{
Weapon.SelectionOrder 30
Weapon.SlotNumber 6
Weapon.AmmoUse 1
Weapon.AmmoGive 40
Weapon.Ammotype "Cell"
Inventory.PickupMessage "New and Improved PlasmaRifle"
Tag "Plasmagun"
States
{
spawn:
GPSP A -1
Loop
ready:
GPLS A 1 A_WeaponReady
Loop
deselect:
GPLS A 1 A_Lower
Loop
select:
GPLS A 1 A_Raise
Loop
fire:
GPLS A 1
GPLS A 0 A_FireCustomMissile("fuzzyplasmo",0,1,0,0,0)
GPLS C 1
GPLS B 0
BPLS B 1
Goto Ready
}
}
actor FuzzyPlasmo : arachnotronplasma
{
speed 50
damage 7
seesound ""
deathsound ""
States
{
Spawn:
TNT1 A 0
APLS AB 5 Bright A_PlaySound("plassyshoot")
Loop
Death:
APBX ABCDE 5 Bright
Stop
}
}[/spoiler]
It gets cutoff exactly like when it's used in SeeSound.
I'll give CHAN_AUTO a go on a duplicate Raily wad <-- my problem persists and it's back to question number 1.
RE: Getting sound to complete after another started
Posted: Sat Aug 01, 2015 6:24 am
by Ænima
Code: Select all
Spawn:
TNT1 A 0
TNT1 A 0 A_PlaySound("plassyshoot")
//intentional fallthrough:
Spawn2:
APLS AB 5 Bright
Loop
Try that. You were calling PlaySound constantly in a loop on the same actor which obviously causes cut offs. You should only call it once, when the actor first spawns.
RE: Getting sound to complete after another started
Posted: Sat Aug 01, 2015 8:46 pm
by Hardbash
Code: Select all
actor FuzzyPlasmo : arachnotronplasma
{
speed 50
damage 7
seesound ""
deathsound ""
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_PlaySound("plassyshoot")
//intentional fallthrough:
Spawn2:
APLS AB 5 Bright
Loop
}
}
which would lead to this ^, right?
takes me back to the problem I had with SeeSound where it only played two firesounds after 10 or 20 shots were fired
RE: Getting sound to complete after another started
Posted: Sat Aug 01, 2015 8:56 pm
by Ænima
Okay then add "$limit plassyshoot 99" in SNDINFO.
RE: Getting sound to complete after another started
Posted: Sat Aug 01, 2015 9:27 pm
by Hardbash
That fixes it, except for when I'm standing pointblank to a wall or enemy. The problem just got reduced from 20 feet to, like, 1 foot (approximations).
It's not that large of an annoyance anymore so this will probably work. Thank you!
RE: Getting sound to complete after another started
Posted: Sat Aug 01, 2015 9:51 pm
by Ænima
If you want to 100% assure that there's no cutoff from say, the projectile dying, you can try playing the sound on another channel or spawning a seperate, invisible clientside actor whose only purpose is to play the sound (hacky but it always works, except it will ONLY PLAY THE SOUND WHERE YOU FIRED THE WEAPON AND WONT FOLLOW THE PROJECTILE).
RE: Getting sound to complete after another started
Posted: Sun Aug 02, 2015 1:58 am
by Ivan
Play the sound like you normally would from your weapon, however, add this to your SNDINFO.
$limit <sound name> 0
And use A_PlaySound for it, not A_PlayWeaponSound.