Modme Forums

[HELP] Trigger audio?

Game Modding | Call of Duty: Black Ops 3 | Scripting


ModmeBot:

Thread By: XxCAFxX

Hello, first i want to state that i am aware that there are youtube videos on how to do this, but the problem is my internet got shut off and im using my phones hotspot which got capped after 3gb -.- so im stuck with 2g speeds making youtube impossible to watch. But anyways im trying to figure out what i would need to do in order to make a trigger that triggers a sound when I walk through it. I have the sound alies prepped and my audio fil is the proper format and whatnot i just dont know how to trigger it.


ModmeBot:

Reply By: natesmithzombies

There is a bit more to this than you might think:

Do you want the sound to be triggered once or multiple times?

Do you want the sound to be played to all players?

Do you want the sound to be a 3d sound or just to a player/players?

Is it area specific music?


ModmeBot:

Reply By: XxCAFxX

natesmithzombies

There is a bit more to this than you might think:

Do you want the sound to be triggered once or multiple times?

Do you want the sound to be played to all players?

Do you want the sound to be a 3d sound or just to a player/players?

Is it area specific music?

Sorry, I should have been more specific. basically im making a bo2 green run style map and i have placed a trigger hurt on each section of lava on the ground so that the player can take damage, but i cant get the flesh fire sound to play when you walk into the trigger hurt, so i would need it to be a 3d sound that every one can hear but only from a certain distance and it would need to be able to be triggered multiple times. another thing i cant figure out is how to make an fx play when you touch the lava, like in bo2 how your characters body catches on fire, if you could help with that too it would be very apreciated. On a side note im using your ambient sound and brutus scripts and they're simply amazing thank you for all your hard work!


ModmeBot:

Reply By: XxCAFxX

natesmithzombies

There is a bit more to this than you might think:

Do you want the sound to be triggered once or multiple times?

Do you want the sound to be played to all players?

Do you want the sound to be a 3d sound or just to a player/players?

Is it area specific music?

I managed to get the sound to play on my trigger hurt using this script

Trig = getEnt("flesh_fire_trig", "targetname");

Trig waittill("trigger", action);

action playsound("flesh_fire");

But now the problem is that it only plays once and its audible from other players. 


ModmeBot:

Reply By: natesmithzombies

You can simply place the code you have made in a while(1) loop like so:

while(1)
{
	//code you made goes here to happen over and over
}



as far as being heard by all players, it sounds like you have made the sound 2d in your sound alias. It should be 3d. Replace that specific instance of 2d to 3d in user_aliases.csv