Game Modding | Call of Duty: Black Ops 3 | Scripting
ModmeBot:
Thread By: TCM
I know this has probably been asked before but for some reason I am trying to use
To play a sound, Really I just want to play a sound to the entire lobby when this easter egg for shooting perks to get a perk is done
I get an error saying player isn't recognized.
ModmeBot:
Reply By: Harry Bo21
TCM
I know this has probably been asked before but for some reason I am trying to use player PlayLocalSound("purchase_accept"); To play a sound, Really I just want to play a sound to the entire lobby when this easter egg for shooting perks to get a perk is done I get an error saying player isn't recognized.
ModmeBot:
Reply By: modric
players = GetPlayers();
foreach (player in players)
{
player Playsoundtoteam( "sound_alias" , "allies" );
}
ModmeBot:
Reply By: Abnormal202
TCM
I know this has probably been asked before but for some reason I am trying to use player PlayLocalSound("purchase_accept"); To play a sound, Really I just want to play a sound to the entire lobby when this easter egg for shooting perks to get a perk is done I get an error saying player isn't recognized.
ModmeBot:
Reply By: Harry Bo21
modric
players = GetPlayers(); foreach (player in players) { player Playsoundtoteam( "sound_alias" , "allies" ); }
ModmeBot:
Reply By: TCM
Abnormal202
TCM I know this has probably been asked before but for some reason I am trying to use player PlayLocalSound("purchase_accept"); To play a sound, Really I just want to play a sound to the entire lobby when this easter egg for shooting perks to get a perk is done I get an error saying player isn't recognized. if you want the whole lobby to hear it, then you should make it a 2D sound in it's alias. That means anyone on the map hears it equally loud. Then you'll want to use a playsound function and play it anywhere (since it's not a 3D sound, location doesn't matter). There are a lot of sound playing functions in the Modme Scriptdocs that you could use. For example: PlaySoundAtPosition("sound",(0,0,0)); This would play it at point (0,0,0) in your map but since it's a 2D sound it doesn't matter where it plays, everyone will hear it.
ModmeBot:
Reply By: Harry Bo21
TCM
Abnormal202 TCM I know this has probably been asked before but for some reason I am trying to use player PlayLocalSound("purchase_accept"); To play a sound, Really I just want to play a sound to the entire lobby when this easter egg for shooting perks to get a perk is done I get an error saying player isn't recognized. if you want the whole lobby to hear it, then you should make it a 2D sound in it's alias. That means anyone on the map hears it equally loud. Then you'll want to use a playsound function and play it anywhere (since it's not a 3D sound, location doesn't matter). There are a lot of sound playing functions in the Modme Scriptdocs that you could use. For example: PlaySoundAtPosition("sound",(0,0,0)); This would play it at point (0,0,0) in your map but since it's a 2D sound it doesn't matter where it plays, everyone will hear it. Shouldn't this work? PlaySoundAtPosition("mus_packapunch_sting",(self.origin)); EDIT: Did that with no luck of hearing the sound at all.. I just want it to play to everyone in the lobby.
ModmeBot:
Reply By: TCM
Harry Bo21
TCM Abnormal202 TCM I know this has probably been asked before but for some reason I am trying to use player PlayLocalSound("purchase_accept"); To play a sound, Really I just want to play a sound to the entire lobby when this easter egg for shooting perks to get a perk is done I get an error saying player isn't recognized. if you want the whole lobby to hear it, then you should make it a 2D sound in it's alias. That means anyone on the map hears it equally loud. Then you'll want to use a playsound function and play it anywhere (since it's not a 3D sound, location doesn't matter). There are a lot of sound playing functions in the Modme Scriptdocs that you could use. For example: PlaySoundAtPosition("sound",(0,0,0)); This would play it at point (0,0,0) in your map but since it's a 2D sound it doesn't matter where it plays, everyone will hear it. Shouldn't this work? PlaySoundAtPosition("mus_packapunch_sting",(self.origin)); EDIT: Did that with no luck of hearing the sound at all.. I just want it to play to everyone in the lobby. then your alias is prob wrong again yes that "would work" but its not the way it should be done really playSound and playSoundAtPosition are intended for 3d sounds players = getPlayers(); foreach ( player in players ) { if ( isAlive( player ) ) level PlaySoundToPlayer( "alias", player ); }
ModmeBot:
Reply By: TCM
Harry Bo21
TCM Abnormal202 TCM I know this has probably been asked before but for some reason I am trying to use player PlayLocalSound("purchase_accept"); To play a sound, Really I just want to play a sound to the entire lobby when this easter egg for shooting perks to get a perk is done I get an error saying player isn't recognized. if you want the whole lobby to hear it, then you should make it a 2D sound in it's alias. That means anyone on the map hears it equally loud. Then you'll want to use a playsound function and play it anywhere (since it's not a 3D sound, location doesn't matter). There are a lot of sound playing functions in the Modme Scriptdocs that you could use. For example: PlaySoundAtPosition("sound",(0,0,0)); This would play it at point (0,0,0) in your map but since it's a 2D sound it doesn't matter where it plays, everyone will hear it. Shouldn't this work? PlaySoundAtPosition("mus_packapunch_sting",(self.origin)); EDIT: Did that with no luck of hearing the sound at all.. I just want it to play to everyone in the lobby. then your alias is prob wrong again yes that "would work" but its not the way it should be done really playSound and playSoundAtPosition are intended for 3d sounds players = getPlayers(); foreach ( player in players ) { if ( isAlive( player ) ) level PlaySoundToPlayer( "alias", player ); }
ModmeBot:
Reply By: TCM
This is what I have right now doing that
EDIT: Points are given but still, No sounds are ever played.
EDIT: BELIEVE I FINALLY GOT IT THANKS.