UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Loop Sound Bite In A Radius

broken avatar :(
Created 11 years ago
by MJPWGaming
0 Members and 1 Guest are viewing this topic.
2,356 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 26 March 2014
Last active: 5 years ago
Posts
200
Respect
Forum Rank
Mr. Elemental
Primary Group
Donator ♥
My Groups
More
×
MJPWGaming's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
MJPWGaming's Contact & Social Links
Im needing to know how to make a custom sound clip of mine (after converted) loop forever in just one area.
This topic contains a post which is marked as the Best Answer. Click here to view it.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Just play it from that area, as a 3D sound, either using playsoundatposition or ent playsound.

To play when player is in area:
Trigger radius. Make ah while loop with waittill("trigger"); and then play the sound, then wait the length of the 3D sound. It will keep looking and finish the loop while while the trigger is being triggered.
Last Edit: July 15, 2015, 07:14:00 pm by MakeCents
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 3 years ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
(ง º ω º )ง u wont sum m8y?
Signature
Do not take life too seriously. You will never get out of it alive.
×
DidUknowiPwn's Groups
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
ambient emitter.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 26 March 2014
Last active: 5 years ago
Posts
200
Respect
Forum Rank
Mr. Elemental
Primary Group
Donator ♥
My Groups
More
×
MJPWGaming's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
MJPWGaming's Contact & Social Links
Just play it from that area, as a 3D sound, either using playsoundatposition or ent playsound.

To play when player is in area:
Trigger radius. Make ah while loop with waittill("trigger"); and then play the sound, then wait the length of the 3D sound. It will keep looking and finish the loop while while the trigger is being triggered.

Im sorry I dont understand :(

EDIT: Ive tried many many tutorials on here and even followed some under the help for the same thing and Im still unable to get it to work :(
Last Edit: July 16, 2015, 10:22:29 pm by MJPWGaming
Marked as best answer by MJPWGaming 11 years ago
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Signature
If you want scripts / features made for you, then contact me by PM or email / skype etc
it will cost you tho so if you have no intention of reciprocating don't even waste my time ;)
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
make the sound 3d in the alias

make a radius and give it a targetname ( well go "sound_thing" for example )

Code Snippet
Plaintext
// add this under zombiemode::main() in your mapname gsc :
ents = getEntArray( "sound_thing", "targetname" ); // finds out which ents to use
for ( i = 0; i < ents.size; i++ ) // loop through each one incase there are multiple
{
    ents[ i ] thread play_sound_trigger(); // Thread our new sound function
}

// Add this way at the bottom - not "inside" another function
play_sound_trigger() // new function name
{
    self waittill( "trigger", player ); // wait till triggered
    player playLoopedSound( "YOUR SOUND NAME" ); // Play the looped sound
    wait 1; // wait a second before checking again - this may be unneccesary
}
Last Edit: July 18, 2015, 08:28:10 pm by Harry Bo21
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 26 March 2014
Last active: 5 years ago
Posts
200
Respect
Forum Rank
Mr. Elemental
Primary Group
Donator ♥
My Groups
More
×
MJPWGaming's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
MJPWGaming's Contact & Social Links
make the sound 3d in the alias

make a radius and give it a targetname ( well go "sound_thing" for example )

Code Snippet
Plaintext
// add this under zombiemode::main() in your mapname gsc :
ents = getEntArray( "sound_thing", "targetname" ); // finds out which ents to use
for ( i = 0; i < ents.size; i++ ) // loop through each one incase there are multiple
{
    ents[ i ] thread play_sound_trigger(); // Thread our new sound function
}

// Add this way at the bottom - not "inside" another function
play_sound_trigger() // new function name
{
    self waittill( "trigger", player ); // wait till triggered
    player playLoopedSound( "YOUR SOUND NAME" ); // Play the looped sound
    wait 1; // wait a second before checking again - this may be unneccesary
}

Thank you it works! My other topic I'm currently trying to fix is still giving me problems if you could take a look at it too I'd greatly appreciate it! Have a nice day! http://ugx-mods.com/forum/index.php?topic=7154.0

 
Loading ...