Thanks Grog! I see what you are saying. I had it in the beginning this way before and not to the subroutine. But I do know that I have a routine that calls different MP3 sounds for the various creatures in the game and I has it as various subroutines to play or loop the (music number). Here is part of the code that carries three(3) of the sounds to the subroutine labeled MSoundOne, etc
~~~~~~
MsoundOne = 16 // idle
MSoundTwo = 17 // attack
MSoundThree = 18 // Dying
SpeedNum = 80
Trsr_Lvl = 44
T=Rnd(15)+Trsr_Lvl
Gosub BuildR
And here is part of the subroutines:
Function RoamDice()
PLAY MUSIC MsoundStart
Set Text Size 36
loop music 6
~
~
~
attack:
SET OBJECT TO CAMERA ORIENTATION AnimNum1
point camera X1,Y1,Z1
Do
Loop Music MSoundOne
IF Level = 5 and MSoundOne = 31 then Loop Music MSoundFour
HIDE OBJECT AnimNum2
SHOW OBJECT AnimNum1
~
~
DICE:
Loop Music 6 // loop dice rattling sound
Show Sprite Dice1
Show Sprite Dice2
Dice1value = RND(5)+1
Dice2value = RND(5)+1
SET SPRITE FRAME Dice1,Dice1value
SET SPRITE FRAME Dice2,Dice2value
Center text 1580,680, "Click Right Mouse button to Stop Roll"
Return
So the MP3's are played or looped all over the program too much to list but I hope you get the jest of the way it plays. I did load the sounds in the beginning as so:
// Starting music for game's background
Load Music "Media\Sounds\Stormy.mp3",45
loop music 45
Load Music "Media\Sounds\ambient-darkness.mp3",1
Load Music "Media\Sounds\Thunderstorm.Mp3",2
Load Music "Media\Sounds\Iron-Open.mp3",3
Load Music "Media\Sounds\Iron-Close.mp3",4
Load Music "Media\Sounds\Pullbrick.mp3",5
Load Music "Media\Sounds\Shakedice.Mp3",6
Load Music "Media\Sounds\Throwdice.mp3",7
Load Music "Media\Sounds\Ghostmoan.mp3",8
Load Music "Media\Sounds\MonsterDeath.mp3",9
Load Music "Media\Sounds\MonsterScreech.mp3",10
Load Music "Media\Sounds\MonsterGrowl.mp3",11
Load Music "Media\Sounds\angry-beast.mp3",12
Load Music "Media\Sounds\Pitbull.mp3",13
Load Music "Media\Sounds\Growl.mp3",14
Load Music "Media\Sounds\Howl.mp3",15
Load Music "Media\Sounds\Zombie-idle.mp3",16
Load Music "Media\Sounds\zombie-attack.mp3",17
Load Music "Media\Sounds\zombie-death.mp3",18
Load Music "Media\Sounds\Ghost-speech.mp3",19
Load Music "Media\Sounds\horror-ghost.mp3",20
Load Music "Media\Sounds\horror-ghost-death.mp3",21
Load Music "Media\Sounds\Crazy-growl.mp3",22
Load Music "Media\Sounds\Crazy-Death.mp3",23
Load Music "Media\Sounds\vampire-hiss.mp3",24
Load Music "Media\Sounds\death-scream.mp3",25
Load Music "Media\Sounds\demon-chant.mp3",26
Load Music "Media\Sounds\werewolf-growl.mp3",28
Load Music "Media\Sounds\wolf-howl.mp3",29
Load Music "Media\Sounds\scary-piano.mp3",30
Load Music "Media\Sounds\DrinkYourBlood.mp3",31
Load Music "Media\Sounds\egornroar.mp3",32
Load Music "Media\Sounds\IceDemon.mp3",33
Load Music "Media\Sounds\ReleaseDoors.mp3",34
Load Music "Media\Sounds\deathmarch.mp3",35
Load Music "Media\Sounds\Crypt1.mp3",36
Load Music "Media\Sounds\Heavy-Rain.mp3",37
Load Music "Media\Sounds\CREEPY3.mp3",38
Load Music "Media\Sounds\earth-rumble.mp3",39
Load Music "Media\Sounds\man-falling.mp3",40
Load Music "Media\Sounds\PORTALVOICE.mp3",41
Load Music "Media\Sounds\TreasuryDoor.mp3",42
Load Music "Media\Sounds\Inexorable.mp3",43
Load Music "Media\Sounds\Lever_Sound.mp3",44
// ===============================================
And the subroutine example played 16,17,& 18 as MSoundOne,MSoundTwo, & MSoundThree. Only problem is that they will not play no matter what. I tried DELETE MUSIC : LOAD MUSIC and LOOP MUSIC MSoundOne to reload it back into memory and still no sound. I have this looping as the background sound and it works great: Load Music "Media\Sounds\Thunderstorm.Mp3",2 at the beginning of the program. A few of the MP3's will play then stop working all together. Since I am using MP3's should I not use MUSIC PLAYING and MUSIC LOOPING? I understand that SOUND is used for WAV's files.
I am wondering where the problem lies: The code, or a bug in the compiler/DBPro, or the sound files themselves. I will rewrite the code again using your suggestions and I will keep you posted. Seems like when I listen to the speakers, it sounds like the MP3's are clogged because on one test the MP3 played and then when called again to play it would not and it followed by all the others not playing, just the looping thunderstorm playing in the background.
Don't call me handsome....Just say I am Visually Basic.