UGX-Mods

Call of Duty 5: World at War => Help Desk => Modding => Topic started by: jei9363 on November 09, 2015, 01:03:39 am

Title: stop loop sound
Post by: jei9363 on November 09, 2015, 01:03:39 am
trying to add final details to my map and am trying to do the meteor sounds. The sound takes a while to stop though?

Code Snippet
Plaintext
	meteor_origin thread play_loop_sound_on_entity( "meteor_loop" );

self waittill("trigger",user);

meteor_origin thread stop_loop_sound_on_entity( "meteor_loop" );
Title: Re: stop loop sound
Post by: JBird632 on November 09, 2015, 01:19:54 am
Well first of all I don't see the point in using treyarch's function - just a bunch of added stuff you don't even need. All you need to do is:
Code Snippet
Plaintext
meteor_origin playloopsound( "meteor_loop" );
self waittill("trigger",user);
meteor_origin stoploopsound();
You issue though is likely that your alias for your sound is probably setup as a normal sound and not looping - so the game has to loop all the way through the sound before finishing (that's why it would take a while to end the sound). To fix that just set the alias to looping in the soundalias that your sound is in.
Title: Re: stop loop sound
Post by: jei9363 on November 09, 2015, 03:53:16 am
Well first of all I don't see the point in using treyarch's function - just a bunch of added stuff you don't even need. All you need to do is:
Code Snippet
Plaintext
meteor_origin playloopsound( "meteor_loop" );
self waittill("trigger",user);
meteor_origin stoploopsound();
You issue though is likely that your alias for your sound is probably setup as a normal sound and not looping - so the game has to loop all the way through the sound before finishing (that's why it would take a while to end the sound). To fix that just set the alias to looping in the soundalias that your sound is in.

that did it thanks man :)