BOOK: Clarification on Chapter 15
by David Horn · in Torque X 2D · 06/18/2009 (10:37 am) · 3 replies
I'm attempting to add sound to my project.
I'm using the SoundComponent of chapter 15. I added it to a dummy object in TXB.
When I ran the project, it gave me an erro on these lines of code.
_waveBank = new WaveBank(Game.Instance.Engine.SFXDevice, "data/sounds/Wave Bank.xwb");
_soundBank = new SoundBank(Game.Instance.Engine.SFXDevice, "data/sounds/Sound Bank.xsb");
It's saying that Game.Instance.Engine.SFXDevice is null. any ideas as to why that might be?
I'm using the SoundComponent of chapter 15. I added it to a dummy object in TXB.
When I ran the project, it gave me an erro on these lines of code.
_waveBank = new WaveBank(Game.Instance.Engine.SFXDevice, "data/sounds/Wave Bank.xwb");
_soundBank = new SoundBank(Game.Instance.Engine.SFXDevice, "data/sounds/Sound Bank.xsb");
It's saying that Game.Instance.Engine.SFXDevice is null. any ideas as to why that might be?
About the author
Torque Owner Sean Monahan
Should be a child of the root node and look something like this: