Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3878684
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T22:38:26+00:00 2026-05-19T22:38:26+00:00

I have a sound cue that I want played whenever the player does a

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T22:38:27+00:00Added an answer on May 19, 2026 at 10:38 pm

    That “Not allowed to use ‘config’ with object variable.” message was a change in UnrealEngine 3.

    I cannot test right now and I’m a UT2004 scripter, but I would try this:

    var SoundCue MonsterNoiseSoundCue;
    var config string MonsterNoiseSoundCueName;
    

    In your PreBeginPlay function (or similar), use this to get the cue:

    MonsterNoiseSoundCue = SoundCue(DynamicLoadObject(MonsterNoiseSoundCueName, class'SoundCue'));
    

    You should get a warning in the log if the sound cue doesn’t exist.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I simply have a sound that executes on a button click. Everything works fine
I have a sound all set up and playing fine, but I want to
I have app in which i have recorded sound files i want that i
Right now I have a single sound playing from one action, button press, accelerometer,
I have an application that starts playing a sound when user touches the uiview
I have a sound effect that I want to only play when the slider
I have my own sound that I want to play while the phone vibrates,
I have a problem with playing video in mediaplayer. I have a sound but
For the needs of my game I need to have 2D sound. That means,
Im a newb. I have a audio sound playing as soon as the new

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.