I have a sound cue that I want played whenever the player does a specific action. I've got it playing fine and everything but I want to make the resource that is used come from a configuration file instead of being hard coded.
So I added a property to my class called MonsterNoiseSoundCue as follows:
var config SoundCue MonsterNoiseSoundCue;
Then in the DefaultProperties section I added the following to the object I create which then then added to the components collection of my pawn.
Begin Object Class=AudioComponent Name=MonsterActivatedSound1
bAutoPlay=false
SoundCue=MonsterNoiseSoundCue// This variable is a configured value. SoundCue'CastleAudio.UI.UI_StopTouchToMove_Cue'
End Object
Components.Add(MonsterActivatedSound1);
MonsterActivatedSound = MonsterActivatedSound1;
For some reason it doesn't build saying "Not allowed to use 'config' with object variable." Does anyone know of another way to approach this?