Getting sound to complete after another started

Discuss all aspects related to modding Zandronum here.
Post Reply
Hardbash
 
Posts: 79
Joined: Tue Jul 03, 2012 5:01 pm
Location: USA! USA!

Getting sound to complete after another started

#1

Post by Hardbash » Sat Aug 01, 2015 4:51 am

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.
Last edited by Hardbash on Sat Aug 01, 2015 4:52 am, edited 1 time in total.
Shut up, nurse!

FascistCat
 
Posts: 98
Joined: Mon Jul 20, 2015 12:51 pm

RE: Getting sound to complete after another started

#2

Post by FascistCat » Sat Aug 01, 2015 5:07 am


User avatar
Ænima
Addicted to Zandronum
Posts: 3583
Joined: Tue Jun 05, 2012 6:12 pm

RE: Getting sound to complete after another started

#3

Post by Ænima » Sat Aug 01, 2015 5:15 am

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).
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

Hardbash
 
Posts: 79
Joined: Tue Jul 03, 2012 5:01 pm
Location: USA! USA!

RE: Getting sound to complete after another started

#4

Post by Hardbash » Sat Aug 01, 2015 5:49 am

Æ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.
Last edited by Hardbash on Sat Aug 01, 2015 5:58 am, edited 1 time in total.
Shut up, nurse!

User avatar
Ænima
Addicted to Zandronum
Posts: 3583
Joined: Tue Jun 05, 2012 6:12 pm

RE: Getting sound to complete after another started

#5

Post by Ænima » Sat Aug 01, 2015 6:24 am

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.
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

Hardbash
 
Posts: 79
Joined: Tue Jul 03, 2012 5:01 pm
Location: USA! USA!

RE: Getting sound to complete after another started

#6

Post by Hardbash » Sat Aug 01, 2015 8:46 pm

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
Shut up, nurse!

User avatar
Ænima
Addicted to Zandronum
Posts: 3583
Joined: Tue Jun 05, 2012 6:12 pm

RE: Getting sound to complete after another started

#7

Post by Ænima » Sat Aug 01, 2015 8:56 pm

Okay then add "$limit plassyshoot 99" in SNDINFO.
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

Hardbash
 
Posts: 79
Joined: Tue Jul 03, 2012 5:01 pm
Location: USA! USA!

RE: Getting sound to complete after another started

#8

Post by Hardbash » Sat Aug 01, 2015 9:27 pm

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!
Shut up, nurse!

User avatar
Ænima
Addicted to Zandronum
Posts: 3583
Joined: Tue Jun 05, 2012 6:12 pm

RE: Getting sound to complete after another started

#9

Post by Ænima » Sat Aug 01, 2015 9:51 pm

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).
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

User avatar
Ivan
Addicted to Zandronum
Posts: 2229
Joined: Mon Jun 04, 2012 5:38 pm
Location: Omnipresent

RE: Getting sound to complete after another started

#10

Post by Ivan » Sun Aug 02, 2015 1:58 am

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.
Last edited by Ivan on Sun Aug 02, 2015 1:58 am, edited 1 time in total.
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===

Post Reply