Polyobject_Sliding door sound problem!

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
Caleb26
Posts: 200
Joined: Sun Feb 07, 2010 4:53 am

Polyobject_Sliding door sound problem!

Post by Caleb26 »

Hi.
I'd like to define opening and closing sliding door sound. Note I want to define two different sounds one for opening and the second one for closing.
I need your help I've lost so many hours trying to figure this out but no luck.
User avatar
Enjay
 
 
Posts: 27140
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Polyobject_Sliding door sound problem!

Post by Enjay »

You have to define the door opening and door closing sequences separately in SNDSEQ and then combine them using the syntax for a multiple sound sequence.

eg you might want something like this for the open and close sounds. These are just copies of the Doom fast door sounds so you might want to change them for your own sounds.

Code: Select all

:DoorOpenBlazingCaleb
	play		doors/dr2_open
	nostopcutoff
end

:DoorCloseBlazingCaleb
	play		doors/dr2_clos
	nostopcutoff
end
and then you combine them using

Code: Select all

[DoorNormalCaleb
	DOOR		21
	PLATFORM	21
	0		DoorOpenBlazingCaleb
	1		DoorCloseBlazingCaleb
	2		DoorOpenBlazingCaleb
	3		DoorCloseBlazingcaleb
]
See how I gave that last bit of code the number 21 (pick a number that is suitable for your needs - eg the first free sequence number you have available)? Use the number (21 in the case of the example) as the sound argument on the poly start line.

I repeated the entries twice because I only want the sequence to play the fast/blazing sound. If you want it to play one sound if moving slowly and another when moving quickly, look at the example on the wiki [wiki]SNDSEQ[/wiki] page (near the bottom). The different speed detection works on normal doors but I have never tried to check that it also works on polyobjects.
Caleb26
Posts: 200
Joined: Sun Feb 07, 2010 4:53 am

Re: Polyobject_Sliding door sound problem!

Post by Caleb26 »

Thanks!!!
Works like a charm.
I've got one more question.
How to scale down PNG. sprites (weapon)? Decorate doesn't work with hud weapons as far as I know.
User avatar
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US
Contact:

Re: Polyobject_Sliding door sound problem!

Post by Ed the Bat »

Caleb26 wrote: How to scale down PNG. sprites (weapon)? Decorate doesn't work with hud weapons as far as I know.
You can use TEXTURES, but it might take some trial-and-error to get the offsets right. That's what I did to make my hi-rez weapon images.
Caleb26
Posts: 200
Joined: Sun Feb 07, 2010 4:53 am

Re: Polyobject_Sliding door sound problem!

Post by Caleb26 »

Well I did like you told me to but now I can't see my weapon sprites at all.
Here's an example.

sprite MG42A0, 150, 150
{

xscale 0.7
yscale 0.7
offset 48,90
}
User avatar
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US
Contact:

Re: Polyobject_Sliding door sound problem!

Post by Ed the Bat »

For one, 0.7 will make them larger. You said you wanted them scaled down. That's up.

Beyond that, you haven't even put a graphic in that texture definition, so of course nothing will be visible.
Caleb26
Posts: 200
Joined: Sun Feb 07, 2010 4:53 am

Re: Polyobject_Sliding door sound problem!

Post by Caleb26 »

MG42A0 is the name of the first weapon sprite. I don't want to replace any graphic I just want to scale down MG42A0 B0 C0 D0 and E0.PNG
User avatar
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US
Contact:

Re: Polyobject_Sliding door sound problem!

Post by Ed the Bat »

Well unless you put a patch in the texture definition, the texture is going to be empty.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Polyobject_Sliding door sound problem!

Post by Gez »

Code: Select all

sprite MG42A0, 150, 150
{
	xscale 1.4
	yscale 1.4
	offset 48,90
	patch MG42A0, 0, 0 {}
}
That will work.
Caleb26
Posts: 200
Joined: Sun Feb 07, 2010 4:53 am

Re: Polyobject_Sliding door sound problem!

Post by Caleb26 »

It works! Thank you all!
Locked

Return to “Editing (Archive)”