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

How to add a sound that loops when you walk in a room?

HOT
broken avatar :(
Created 7 years ago
by ect0
0 Members and 1 Guest are viewing this topic.
6,504 views
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 4 years ago
Posts
6,877
Respect
1,004Add +1
Forum Rank
Immortal
Primary Group
Community 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.
Community 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 Links[email protected]HarryBo21HarryBo000
You would either use "playloopsound" - on - the ent

Or not have a ent and use playsoundatposition - which isn't looping

Not spawn a ent and use its origin in this case, that's completely backwards and not what he asked

Main reason is breaking the loop won't stop the sound, it'll carry on to completion. Play it "on" something using playloopsound - then to stop it delete the ent it's on
Last Edit: April 18, 2017, 01:10:25 pm by Harry Bo21
broken avatar :(
×
broken avatar :(
Location: jp
Date Registered: 26 June 2016
Last active: 2 years ago
Posts
86
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
×
Conbini2017's Groups
Conbini2017's Contact & Social Linksdadakhrconbini2017
Code Snippet
Plaintext
//A comment is //comment. Compiler skips code with //
#using scripts\zm\_zm_utility; //use a script outside of current scope
while(1) { //loop begin. Run code while true. If 1 becomes zero loop stops.
ent = GetEnt("ent","targetname"); //locates an object named "ent". Make this a script_struct or script_origin
zm_utility::play_sound_at_pos("a_sound", ent.origin);  // play sound with name "a_sound" at the object
if (break_out_of_loop) {break;} //clause to stop the sound if necessary
wait(insert_sound_length_here); //ex. wait(3) stops code for 3 seconds
} //loop end
What should I change this code and what should I put in there?
Will you teach me?
Last Edit: April 19, 2017, 03:57:52 pm by Conbini2017
broken avatar :(
×
broken avatar :(
Location: caCanada, Eh
Date Registered: 24 November 2016
Last active: 6 years ago
Posts
85
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
×
MegaMech43's Groups
MegaMech43's Contact & Social Linksmegamechmegamech.net
Literally just youtube search "black ops 3 mod tools triggers" or "trigger_multiple"
Or try "Radiant black tutorial triggers".

You'll find something. Sometimes it may not be a tutorial about your specific purpose, but you can re-purpose things to do what you want them to do. Also some things apply across the board. Once you know how to setup one trigger, all triggers are pretty much the same.

 
Loading ...