Game Development Community

Sound tutorial and Null refrence error

by John Bura · in Torque X 2D · 06/14/2010 (6:38 am) · 2 replies

Hi there

I have tried this tutorial.
[url] http://sites.google.com/site/soyouwanttomakeanarenashooter/tutorial-4---aural-delights[/url]

But I can't seem to get past the null reference exception error. Here is the line that gives me the problem.
AudioCategory _sfx = Game.Instance.Engine.SFXDevice.GetCategory("Sounds");

I have edited this line in the torquesettings.xml
<EnableAudio>true</EnableAudio>
<AudioGlobalSettingsFile>
data/sounds/ArenaShooterSounds.xgs
</AudioGlobalSettingsFile>

Im not sure what else to do. All I really want to do is play simple sounds. Is there a tutorial out there that can help me do that?

#1
06/14/2010 (8:52 am)
LOL I found a good one to use

Believe it or not this one works very well.

http://rbwhitaker.wikidot.com/using-xact

Sorry to clutter up the forums.
#2
06/15/2010 (11:16 pm)
Hey thanks for trying the shooter tutorials. I can only think that maybe you didn't create a Sounds category in XACT? I should have some more tutorials up soon, I hope you try them.