Title: Re: How to add a sound that loops when you walk in a room?
Post by: MegaMech43 on February 04, 2017, 09:07:03 pm
Put code in function. Run function with thread functionname()
Title: Re: How to add a sound that loops when you walk in a room?
Post by: Conbini2017 on March 20, 2017, 02:36:58 pm
Because I do not understand script at all, please tell me in detail. :(
Title: Re: How to add a sound that loops when you walk in a room?
Post by: MegaMech43 on March 20, 2017, 04:30:26 pm
Modified with more detail
Title: Re: How to add a sound that loops when you walk in a room?
Post by: Conbini2017 on March 21, 2017, 09:31:20 am
Thank you very much How (break_out_of_loop) {break;} is used?
Title: Re: How to add a sound that loops when you walk in a room?
Post by: MegaMech43 on March 23, 2017, 12:36:06 am
Depends on what you're doing. For example
if (variable_name) {break;}
(Code elsewhere)
if (blah) {variable_name = true;} or you could just do variable_name = true; Now next time the code runs it will stop. Actually you probably want this code BEFORE the sound plays to prevent it from playing again.
Title: Re: How to add a sound that loops when you walk in a room?
Post by: Cxwh on March 29, 2017, 11:54:56 pm
You'd do that using zones
Title: Re: How to add a sound that loops when you walk in a room?
Post by: MegaMech43 on March 30, 2017, 01:32:03 am
Not necessarily. You could make the zone trigger a script but the OP didn't specify. I find it easier to use a trigger. My example didn't explain how to trigger the code. It's easy enough to figure out.
Title: Re: How to add a sound that loops when you walk in a room?
Post by: Conbini2017 on April 01, 2017, 05:42:35 pm
Not necessarily. You could make the zone trigger a script but the OP didn't specify. I find it easier to use a trigger. My example didn't explain how to trigger the code. It's easy enough to figure out.
Could you tell me how to use the zone?
Title: Re: How to add a sound that loops when you walk in a room?
Post by: MegaMech43 on April 01, 2017, 08:23:31 pm
Make a trigger_multiple surround the entrance or the entire room, whatever. Add a key/value and use these functions: It's up to you to make it work. You won't learn anything if I do it for you. Search the forums for answers how to use these if you can't figure out how or look it up on the API
Title: Re: How to add a sound that loops when you walk in a room?
Post by: Conbini2017 on April 16, 2017, 01:20:59 pm
I think the error is due to you not putting: #using scripts\zm\_zm_utility; at the top of the code where it's supposed to go.
Here's some code:
I will try it at once. :) How can I do with radiant? What is it, trigger? Is entity info better to write script_sound and script_label? please tell me. Please.
Title: Re: How to add a sound that loops when you walk in a room?
Post by: MegaMech43 on April 17, 2017, 10:44:25 pm
Go watch some tutorials.
Title: Re: How to add a sound that loops when you walk in a room?
Post by: Conbini2017 on April 18, 2017, 07:57:20 am
Title: Re: How to add a sound that loops when you walk in a room?
Post by: Harry Bo21 on April 18, 2017, 01:09:00 pm
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
Title: Re: How to add a sound that loops when you walk in a room?
Post by: Conbini2017 on April 18, 2017, 03:04:14 pm
What should I change this code and what should I put in there? Will you teach me?
Title: Re: How to add a sound that loops when you walk in a room?
Post by: MegaMech43 on April 20, 2017, 07:37:07 am
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.