|
 | Tested | |  |
| Poster | : samer | | Posts | : 28 | | Country | : Lebanon | | City | : Tripoli |
| | | | Posted by samer on 16/10/2008 at 16:51:20
| | | hey riemer sorry for being late on testing this chapter, its fully working except for 1 tiny mistake, when u launch the rocket you are playing the explosion sound not the launch one, in the explanation its correts but in the code its wrong, maybe you can fix it when you add the sound links ;) thanks for this great tutorial man you gave me a huge amount of information, thank you for sharing it, i'll be continuing the next tutorials now, going into 3D ;) hope it would be as fun as this one. i'll be constantly checkin the forums and i'll try to help people across this tutorial. hope you have some more to put on this website ;). | |
|
| | | | | | Poster | : Anonymous | | Posts | : | | Country | : | | City | : |
| | | | Posted by Anonymous on 14/02/2012 at 16:24:08
| | Hey I know this is an old topic but I ran into this problem, don't know if its due to XNA 4.0 or anything but:
In the tut it says to put:
And load them in your LoadContent method:
hitCannon = Content.Load("hitcannon");
hitTerrain = Content.Load("hitterrain");
launch = Content.Load("launch");
I found that I needed to put:
hitCannon = Content.Load<SoundEffect("hitcannon");
hitTerrain = Content.Load<SoundEffect("hitterrain");
launch = Content.Load<SoundEffect>("launch");
Adding a <SoundEffect>, otherwise VS2010 came up with an error before you could do anything.
After that it wouldn't load and I got
File contains Microsoft.Xna.Framework.Media.Song but trying to load as Microsoft.Xna.Framework.Audio.SoundEffect.
After using Google, found
http://heine.familiedeelstra.com/soundeffect-contentloadexception
Basically
Select the file filename in the Solution Explorer.
Go to its Properties tab.
Set the Content Processor to Sound Effect
Hope this helps someone.
| |
|
| | | | | | Poster | : Anonymous | | Posts | : | | Country | : | | City | : |
| | | | Posted by Anonymous on 13/08/2012 at 08:29:11
| | Yea, thanks this helped me as i was getting this error.
I figured out that the <SoundEffect> was needed as its not in the tutorial... :) | |
|
|
 | | |  |
|
|
|
If you appreciate the amount of time I spend creating and updating these pages, feel free to donate -- any amount is welcome !
|
- Website design & DirectX code : Riemer Grootjans - ©2006 Riemer Grootjans
|
|