Game Modding | Call of Duty: Black Ops 3 | Scripting
Pepergogo:
Thread By: Pepergogo Hi So, I'm using a sound trigger created by IceGranade, but if I use more than one I need to activate the first one before the next. Anyone know if is possible to activate any trigger at anytime without activate the previous?
I will be really greatful :D
tom5300:
Reply By: tom5300
Pepergogo Hi So, I'm using a sound trigger created by IceGranade, but if I use more than one I need to activate the first one before the next. Anyone know if is possible to activate any trigger at anytime without activate the previous? I will be really greatful :D //Trigger sound Trig = getEnt("radio_trig", "targetname"); //Trigger targetname Trig setHintString("Press &&1 to enable radio"); //Message in game Trig waittill("trigger", action); action playsound("snail_jingle"); //Audio ID level.radio_playing = true; wait(59); level.radio_playing = false; Trig = getEnt("radio_trig1", "targetname"); //Trigger targetname Trig waittill("trigger", action); action playsound("cryo_jingle"); //Audio ID level.radio_playing = true; wait(90); level.radio_playing = false;
You would have to use threaded functions. Something like this in mapname.gsc: In main() somewhere after zm_usermap::main(); add:
and underneath the main() function add:
The above function takes the targetname of a trigger as the first parameter and the name of the sound alias you want to play as the second parameter. So to add another radio, you would just add another line in the main() Ex: level thread radio_play_sound("new_radio_trigger", "custom_radio_vox");
I did not test this code, but hopefully it works for your purpose.
Pepergogo:
Reply By: tom5300
You would have to use threaded functions. Something like this in mapname.gsc: In main() somewhere after zm_usermap::main(); add:
and underneath the main() function add:
The above function takes the targetname of a trigger as the first parameter and the name of the sound alias you want to play as the second parameter. So to add another radio, you would just add another line in the main() Ex: level thread radio_play_sound("new_radio_trigger", "custom_radio_vox");
I did not test this code, but hopefully it works for your purpose.