Game Modding | Call of Duty: Black Ops 3 | Scripting
ModmeBot:
Thread By: gunrock12
I can't get my multiple triggers with the same targetname to work! it works fine if it
is a simple GetEnt but as soon as i changed it into a GetEntArray all triggers fail to activate.
I almost got this solved! any help is appreciated thank you.
function soundbox1()////////PLAYS SOUND LOOP WHILE PLAYER IS IN THE TRIGGER
{
soundbox1_trig = GetEntArray( "area_sound1","targetname" );
soundbox1_trig waittill("trigger", player);
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;
}
}
ModmeBot:
Reply By: mathfag
You need a separate function.
Not sure what you're trying to do in this function but I fixed it to my best effort.
Putting a while(1) inside a for(;;) is stupid (no offence). The for(;;) loop is pointless because the while(1) makes it loop forever anyway.
Didn't test this out. Hope it works.
Make sure your alias is marked as LOOPING.
ModmeBot:
Reply By: gunrock12
Thanks for the reply though it worked it didn't play the sound and it triggered only once where the trigger's are suppose
to be repeatable. I feel we are getting close though. My alias sound is marked as looping.
ModmeBot:
Reply By: gunrock12
Okay i got it working! just changed around a few things! Was stuck on this for awhile thank you!