convert sound variables to PlaySound parameters

Discussions about Coding and Scripting
User avatar
Barbie
Godlike
Posts: 3000
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

convert sound variables to PlaySound parameters

Post by Barbie »

Some years ago I messed around with class'Actor's

Code: Select all

native(264) final function PlaySound(
	sound Sound,
	optional ESoundSlot Slot,
	optional float Volume,
	optional bool bNoOverride,
	optional float Radius,
	optional float Pitch);
and some tests showed that these parameters are NOT the ones used in UnrealEd, section "Sound" but have to be scaled:

Code: Select all

PlaySound(
	AmbientSound,
	SlotForSound,
	SoundVolume / 128,
	SoundNoOverride,
	SoundRadius * 25,
	SoundPitch / 64)
(see also UnrealWiki).

Can this be confirmed?

PS: See also thread SoundPitch vs. Pitch.
"If Origin not in center it be not in center." --Buggie
User avatar
Barbie
Godlike
Posts: 3000
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: convert sound variables to PlaySound parameters

Post by Barbie »

Real Tim Swannie told in Discord:

Code: Select all

PlaySound(
	AmbientSound,
	SlotForSound,
	SoundVolume / 255,
	SoundNoOverride,
	SoundRadius,
	SoundPitch / 64
	)
"If Origin not in center it be not in center." --Buggie