| 07-03-2003, 05:40 AM | #1 |
Ok, how on gods green earth can you obtain player specific sound. I've been trying/looking for a way for about 7 hours now. Please, no "Well, it might work" answers. Not that I dont appreciate the help, I've just tried 3 of those already >.<. Is this impossible? It is VERY important to my map. |
| 07-03-2003, 05:45 AM | #2 |
I dont think its possible. Then again I'm not the sound guy around here, so there might be someone flaming me like no tomorrow, but to my knowledge playing a sound for just 1 player is not an option. |
| 07-03-2003, 05:47 AM | #3 |
This "might work." ;) You'll need to use JASS. Do this: Code:
if(PlayerYouWantSoundtoPlayFor == GetLocalPlayer()) then
//play sound
endifReplace "//play sound" with the command to play the sound you want. See if that works without desyncing the game. |
| 07-03-2003, 06:47 AM | #4 | |
Quote:
Sorry if this is a bit newbish.. but i'm lacking any custom text skills.. i asume u change a trigger to custom text, then u insert that.. but.. uhhh.. where would u put it in a custom text trigger? And dont i need other things too? |
| 07-03-2003, 07:00 AM | #5 | |
Quote:
JASS = custom text, the language the text is written in. |
| 07-03-2003, 07:01 AM | #6 |
Ha, i just realised.. u got to the reply faster than i did the edit =P |
| 07-03-2003, 07:28 AM | #7 |
Well, i'm looking into JASS.. this custom trigger stuff is awsome.. i made a crap load of text letters go alllll over the screen =D |
| 07-03-2003, 08:21 AM | #8 |
Well.. I'm about 99% lost here... I made it like this.. keeps giving me errors. if (PlayerYouWantSoundtoPlayFor == GetLocalPlayer()) then call PlaySoundBJ( udg_SoundsofGhost[GetRandomInt(1, 5)] ) endif Heres the entire trigger without the part u gave me. ============================================ function Trig_Unit_Select_Copy_Conditions takes nothing returns boolean if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(0) ) ) then return false endif if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'hC00' ) ) then return false endif return true endfunction function Trig_Unit_Select_Copy_Actions takes nothing returns nothing call PlaySoundBJ( udg_SoundsofGhost[GetRandomInt(1, 5)] ) endfunction //=========================================================================== function InitTrig_Unit_Select_Copy takes nothing returns nothing set gg_trg_Unit_Select_Copy = CreateTrigger( ) call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Unit_Select_Copy, Player(0), true ) call TriggerAddCondition( gg_trg_Unit_Select_Copy, Condition( function Trig_Unit_Select_Copy_Conditions ) ) call TriggerAddAction( gg_trg_Unit_Select_Copy, function Trig_Unit_Select_Copy_Actions ) endfunction |
| 07-03-2003, 12:56 PM | #9 |
Well , If you are not trying to play music, and only want an interface sound, you may try a transmission from "A unit Called (space) display message (space) " and don't wait Use the Convert player to player group function to send the transmision to a single player. |
| 07-03-2003, 04:34 PM | #10 |
I heard that causes game desyncs? |
| 07-03-2003, 05:20 PM | #11 | |
Quote:
Got that working.. causes game desync.. god dammit, isnt there ANYWAY to do this!? |
| 07-03-2003, 06:52 PM | #12 |
Ok, i'll pay someone 10 USD for a damn way to make this work ^.^ |
| 07-03-2003, 07:27 PM | #13 |
Oh, and is it possible to send specific player sounds in cinimatic mode? |
