I'm a doctor, not a mechanic

Difference between revisions of "Legacy talk:DynamicAmbientSound"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
(Bug in terminating the number of Sounds)
 
m ("before" -> "in front of" EN is not my native...)
 
Line 18: Line 18:
 
[...]
 
[...]
 
</uscript>
 
</uscript>
If all array fields of ''Sounds[]'' have a value, no one will be ''None'' and ''numSounds'' will stay at 6. I guess the developer has forgotten the "1" before the "6" - with the statement "numSounds=16;" the code determinates the number of sounds correctly. --[[User:SeriousBarbie|SeriousBarbie]] ([[User talk:SeriousBarbie|talk]]) 05:30, 16 December 2015 (EST)
+
If all array fields of ''Sounds[]'' have a value, no one will be ''None'' and ''numSounds'' will stay at 6. I guess the developer has forgotten the "1" in front of the "6" - with the statement "numSounds=16;" the code determinates the number of sounds correctly. --[[User:SeriousBarbie|SeriousBarbie]] ([[User talk:SeriousBarbie|talk]]) 05:30, 16 December 2015 (EST)

Latest revision as of 11:37, 16 December 2015

Bug in terminating the number of Sounds[edit]

If you have a look at the script, you'll find the following:

function BeginPlay () 
{
 
	local int i;
 
	// Calculate how many sounds the user specified
	numSounds=6;
	for (i=0; i<16; i++) 
	{
		if (Sounds[i] == None) 
		{
			numSounds=i;
			break;
		}
	}
[...]

If all array fields of Sounds[] have a value, no one will be None and numSounds will stay at 6. I guess the developer has forgotten the "1" in front of the "6" - with the statement "numSounds=16;" the code determinates the number of sounds correctly. --SeriousBarbie (talk) 05:30, 16 December 2015 (EST)