Game Modding | Call of Duty: Black Ops 3 | Scripting
ModmeBot:
Thread By: gunrock12
I have two triggers both looping while the players stand it. one starts the music while the other trigger stops it
while the player stands in it. The problem is once the player stands in the stop looping sound second trigger the music keeps on playing.
How do i get the music to stop playing in the second trigger the player stands in?
jack,,,mp_test_sound\jack.wav,,,UIN_MOD,,,,,,,,,0,0,100,100,0,200,200,,,,,,,,,1,1,,,,,,3D,front,,LOOPING,,,0,0,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
function soundbox1()////////PLAYS SOUND LOOP WHILE PLAYER IS IN THE TRIGGER
{
soundbox1_trig = GetEnt("area_sound1", "targetname");
soundbox1_trig waittill("trigger");
players = GetPlayers();
for (i = 0; i < players.size; i++)
while(1)
{
while(!(playersistouching(soundbox1_trig)))
wait 0.5;
iprintlnbold("playing sound");
playersPlayLoopSound( "jack" );
wait 8;
}
}
function soundbox1_stop()////////STOPS SOUND LOOP WHILE PLAYER IS IN THE TRIGGER
{
soundbox2_trig = GetEnt("area_sound2", "targetname");
soundbox2_trig waittill("trigger");
players = GetPlayers();
for (i = 0; i < players.size; i++)
while(1)
{
while(!(playersistouching(soundbox2_trig)))
wait 0.5;
iprintlnbold("stoping sound");
playersStopLoopSound( "jack" );/////////THIS DOSEN'T WORK SOUND STILL PLAYS!
wait 8;
}
}