Game Development Community

Bug or error?

by Prince of Troy · in Torque Game Engine · 02/13/2006 (2:30 pm) · 2 replies

I have a problem whit a function, in ....client\scrips\audioprofiles.cs:
......
new AudioDescription(AudioMusic)
{
volume = 0.9;
isLooping= true;
is3D = false;
type = $BattleMusicAudioType;
};


new AudioProfile(AudioIntroMusicProfile)
{
filename = "~/data/sound/music/earth.wav";
description = "AudioMusic";
preload = true;
};




alxPlay(AudioIntroMusicProfile);// Im playing the music, no problem here
alxStop(AudioIntroMusicProfile);//I want to stop the music, problem here, the music don't stop
//alxStopAll();//This function works fine, all music stop
......

I need to control the music, but the function alxStop(%handle) don't work, something is wrong on my code?

help will be apreciated.

#1
02/14/2006 (11:42 am)
Tt936 - Im opretty sure this is the correct code:

$myMusicHandle = alxPlay(AudioIntroMusicProfile);// Im playing the music, no problem here
alxStop($myMusicHandle);//I want to stop the music, problem here, the music don't stop
//alxStopAll();//This function works fine, all music stop

Give that a try :)
#2
02/15/2006 (5:46 pm)
That works! thank you.