The music is the only thing I emit from outside the game loop. If I use it inside, it just repeats numerous times per second. I would do the same thing with the sounds but If... Then statements do not work too well out side the game loop.
I'm guessing that channels might solve this problem but I don't know how to use them too well.
Ok. I guess it didn't take a whole day.
Here is an example of a sound that repeats numerous times per second:
My guess is that this is because of the MouseDOWN command. Though, I can't get the result I want with the gauge with a MouseDown command.
Here is an example of a sound that repeats automatically:
Behold my barbaric coding!
If you have any channel advice for this, it would help, I'm sure.
PS: Sorry if I am being a pest asking all these questions. But I do appriciate the help.
I'm guessing that channels might solve this problem but I don't know how to use them too well.
Ok. I guess it didn't take a whole day.
Here is an example of a sound that repeats numerous times per second:
Global thrust=LoadSound("Escaping The Atmosphere.wav") Graphics3D 1024,764 SetBuffer BackBuffer() While Not KeyDown(1) ;Run gauge If fin=0 Then Color 255,255,255 Rect 90,155,run#,20,1 If MouseDown(2) And KeyDown(200=True Then run#=run# -.8 thrustchn=PlaySound(thrust) Else run#=run# +.3 EndIf EndIf RenderWorld Flip Wend End
My guess is that this is because of the MouseDOWN command. Though, I can't get the result I want with the gauge with a MouseDown command.
Here is an example of a sound that repeats automatically:
Global die=LoadSound("Screams Male 03.wav") Graphics3D 1024,764 SetBuffer BackBuffer() While Not KeyDown(1) targethealth(ammo.bullet,foe.target) RenderWorld Flip Wend End Function targethealth(ammo.bullet,foe.target) If CountCollisions(ammo\shape)>0 entity=EntityCollided(ammo\shape,type_target) If entity>0 foe.target=Object.target(EntityName(entity)) foe\health=foe\health-1 If foe<>Null And foe\health=0 HideEntity foe\shape HideEntity ammo\shape dascore#=dascore#+1 foesleft=foesleft-1 PlaySound(die) EndIf EndIf EndIf End Function
Behold my barbaric coding!
If you have any channel advice for this, it would help, I'm sure.
PS: Sorry if I am being a pest asking all these questions. But I do appriciate the help.