Play music only to one player?

nabbig2

New Member
Reaction score
43
I want it so that when a player types something, a certain music plays, but only for him. Is it possible?
 

nabbig2

New Member
Reaction score
43
Is that custom script? If so, where in my trigger do I put it? Sorry, I don't understand.
 

THE_X

New Member
Reaction score
49
yes it is a custom script, and it plays the music for the player you want it to (udg_PLAYERVARIABLE = a preset player) and (udg_SOUNDVARIABLE) is the sound you want to play
 

nabbig2

New Member
Reaction score
43
Can you post how it would look in the trigger please? Thanks a lot, that would help me understand it.
 

n00b1l1ty

Lєgєπd of Mysтicfаlcoи
Reaction score
46
Code:
Example
    Events
        Unit - A unit enters (Playable map area)
    Conditions
    Actions
        Set MyPlayer = (Owner of (Entering unit))
        Custom script:   call StartSoundForPlayerBJ(udg_MyPlayer,udg_firstblood)
        -------- End of code. --------
 

nabbig2

New Member
Reaction score
43
Code:
playmusic1
    Events
        Player - Player 1 (Red) types a chat message containing -music1 as An exact match
    Conditions
    Actions
        Set Player1music = (Matching player)
        Custom script:   call StartSoundForPlayerBJ(udg_Player1music,udg_PH1)

It says there is an error in the custom script. Player1music is the player variable, and PH1 is the song. What do I need to change?
 

nabbig2

New Member
Reaction score
43
Like this?
Code:
call StartSoundForPlayerBJ(udg_Player1music,udg_gg_snd_PH1)

It still says error.
 

Azlier

Old World Ghost
Reaction score
461
Even if the custom script is correct, no sound will play for the player variable you have specified. You see, you set Player1Music to matching player. What you're looking for is Triggering Player. Then, it might work.
 

nabbig2

New Member
Reaction score
43
Like this? Still says error :banghead::banghead::banghead:

Code:
playmusic1
    Events
        Player - Player 1 (Red) types a chat message containing -song1 as An exact match
    Conditions
    Actions
        Set Player1music = Player 1 (Red)
        Custom script:   call StartSoundForPlayerBJ(Player1music)),gg_snd_PH1)
 

DiDdY

New Member
Reaction score
14
Like this? Still says error :banghead::banghead::banghead:

Code:
playmusic1
    Events
        Player - Player 1 (Red) types a chat message containing -song1 as An exact match
    Conditions
    Actions
        Set Player1music = Player 1 (Red)
        Custom script:   call StartSoundForPlayerBJ(Player1music[COLOR="Red"]))[/COLOR],gg_snd_PH1)

Where did you get all them extra brackets from? Check the post above the quoted post.

Chocobo said:
call StartSoundForPlayerBJ(GetOwningPlayer(GetTriggerUnit()),gg_snd_PH1)
 

nabbig2

New Member
Reaction score
43
Code:
call StartSoundForPlayerBJ(Player1music),gg_snd_PH1)
Like this? Won't work still.......
 

DiDdY

New Member
Reaction score
14
Code:
call StartSoundForPlayerBJ(Player1music),gg_snd_PH1)
Like this? Won't work still.......

No!

Code:
call StartSoundForPlayerBJ(Player1music,gg_snd_PH1)

Just use chocobos.

Code:
call StartSoundForPlayerBJ(GetOwningPlayer(GetTriggerUnit()),gg_snd_PH1)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top