Game Development Community

Sound Profile beginner question

by Chris Groot · in Torque 3D Professional · 05/02/2011 (4:38 pm) · 3 replies

I am looking to add sound to my gui buttons and I was looking into using the built in SFXProfile contained within GuiControlProfiles but I am having some issues.
I am having some trouble getting a GuiControlProfile's SFXProfile variable "mSoundButtonDown" to initialize and/or load anything. I currently create a new SFXProfile within the audioProfiles.cs file found in art/datablocks/ :
datablock SFXProfile(GuiButton_Snd)
{
   fileName = "MySound.ogg";
   description = "Audio2D";
   preload = true;
};

I then attempt to set mSoundButtonDown equal to my new Profile "GuiButton_Snd".
singleton GuiControlProfile( GuiCustomMenuButtonProfile :  GuiMenuButtonProfile)
{
   modal = true;
   soundButtonDown = GuiButton_Snd;
}
After starting up my application I get an error in the console window saying: Object 'GuiButton_Snd' is not a member of the 'SFXProfile' data block class.

I am wondering if there is something I am missing in creating my new SFXProfile?

#1
05/03/2011 (9:16 am)
Hi Adam , if you havent already read this thread

http://www.garagegames.com/community/forums/viewthread/108845
#2
05/03/2011 (9:43 am)
Thank you Donald. That thread was exactly what I was looking for. I was forgetting to execute my audio cs files XD Thanks again!
#3
05/03/2011 (10:10 am)
I did the same thing :) glad it helped