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/ :
I then attempt to set mSoundButtonDown equal to my new Profile "GuiButton_Snd".
I am wondering if there is something I am missing in creating my new SFXProfile?
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?
#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!
Torque Owner Donald Teal
Duck's Den Productions Inc
http://www.garagegames.com/community/forums/viewthread/108845