How do you play Music to a single player?

RadiuS.x

Active Member
Reaction score
2
Exactly as the title asks,
How do you play Music to a single player?

Also, how do you initiate a fade filter to a single player as well?
 

keychup

Active Member
Reaction score
34
Trigger:
  • Player Group - Pick every player in (Convert Player to PlayerGroup) and do (Actions)
    • Loop - Actions
    • Custom script: if GetLocalPlayer() == GetEnumPlayer() then
    • Play Music Actions
    • Custom script: endif


EDIT: Test it with someone then tell me if it works
 

RedOrb

You can change this now in User CP.
Reaction score
14
If you put this into your map-specific code box:

Code:
function PlaySoundForPlayer takes sound s, player p returns nothing
set bj_lastPlayedSound = s
if s != null and GetLocalPlayer() == p then
call StartSound(s)
endif
endfunction

and then for every time you want to play a sound use this:

Code:
Set MISSION_StartSoundPlayer = (Owner of (Triggering unit))
Custom script:  call PlaySoundForPlayer( gg_snd_SecretFound, udg_MISSION_StartSoundPlayer )

Where "SecretFound" is the name of the sound shown in your sound editor.
Make sure you set the sound to play 'as sound' in the sound editor.
This works, but I'm not sure it would suit every purpose.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top