• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Playing song for player group

Status
Not open for further replies.
Level 9
Joined
May 30, 2008
Messages
430
i chek the sound menu but i can't find play song for player group (it's yeasy becouse i can make when player type -sound off i simply to remove him from the group)... I need that becouse in my map i have 1 song but it's played whole game (i can't remove it becouse it's map of my clan and clan master wonna song to stay) and me and most of the player get bored so i wonna make trigger -song off and playing of this song for triggering player to be disabled -song on etc. But i still can't find how to make the song to be played for player not for all

+rep for first one that help me btw GUI is prefered
 
Level 6
Joined
Sep 5, 2007
Messages
264
Use the "If player types string" events, for each player

Just use GetLocalPlayer to check against the typing player, if the two are the same, then the player typing the message is the "local" one. Then, for the local player, set the music volume to 0.
 
Level 12
Joined
Aug 22, 2008
Messages
911
this command don't work spam reported

Be more cooperative you could be onix, see this as spam I do not. Read the site rules you should to know exactly what is spamming.
Also, works the solution does not (probably) because of your version of Warcraft. Do you have Frozen Throne?

Anyway, using Lord Bones' solution (using "Player X types <YourString> as an exact match"), I recommend. Possible in GUI this is, help you with triggering I will: (but I won't do the entire thing for you)
  • Events
    • Player - Player 1 types -music off as an exact match
    • -------- And so on for each player --------
  • Actions
    • Sound - YourActions
EDIT: [offtopic] 250th post... :p [/offtopic]
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Like mentioned, hit Ctrl+M ingame to disable the music channel.
Ctrl+S disables the sound channel, but then again I dought anyone smart would play music throu the sound channel, afterall that is why there is a "music" channel.

As both were perfectly valid answers, they will not be treated as spam.

I take it your clan leader was foolish and decided to play a song throu the primary sound channel. If he honestly can not be bothered to shift it to the music channel, you can play sounds to only certain players. To do this you run the code to play the sound for only a certain player via the GetLocalPlayer native. You can see this being used in TKoK, infact it probably has the very system you want to make.

GetLocalPlayer() returns the human player who is running the code, thus it will never return the same value for any other players in the game. Combine this with a conditional statement and you are able to run code out of sync and so only for 1 player. Avoid running anything that influences game play thou as it could cause OOS (desync) otherwise.
 
Level 9
Joined
May 30, 2008
Messages
430
i still can't get nothing but i make it in another way (becouse of the fact in sound menu have only attach sound to point and to unit others are play sound and u can't select for who) here is example for what i am talking about
  • Example
    • Events
    • Conditions
    • Actions
      • Sound - Play mysound <gen>
      • Sound - Play mysound <gen> at 100.00% volume, located at (Center of (Playable map area)) with Z offset 0.00
      • Sound - mysound <gen> at 100.00% volume, attached to footman <gen>
      • Sound - mysound <gen> at 100.00% volume, skipping the first 0.00 seconds
      • Sound - Stop mysound <gen> After fading
      • Sound - Destroy mysound <gen>
      • Sound - Set volume of mysound <gen> to 100.00%
      • Sound - Skip to 0.00 seconds from the start of mysound <gen>
      • Sound - Set cutoff distance of mysound <gen> to 1000.00
      • Sound - Attach mysound <gen> to Footman <gen>
      • Sound - Set position of mysound <gen> to (Center of (Playable map area)) with Z offset 0.00
DO ANYONE OF YOU SEE WHERE YOU CAN CHOOSE FOR WHYCH PLAYER TO PLAY THE SONG? Becouse i don't, do anyone see for which player group you can play the song becouse i don't. If is posible i think it's not hard to show me where is this just by writing 1 line but no one do it (i found alternative variant 10x for the help of all of you) and becouse of the fact i never bother with sounds it's kinda hard for me you know ... and there is not alot of unprotected maps that show how i can make it, there are even no help in this site about how you can make it.

Edit:
Dr Super Good i am sure u know alot of things, i am sure u know very good JASS but i know only GUI and my question is not very easy category to tell me move trigering unit to point of casting unit or gold cost of the item is under .... but nvm, if you chek my posts you can see that i help to ppls that have need (not becouse they are lazy but becouse things are hard, as moderator you should know which triggers are hard to do and which are hard becouse the person is lazy to read)
Sorry about the grammars sorrry about my posts but i still remember the time when u ask "how to spawn units at front of my barack" and ppls give you the trigger at the moment. Things change now ppls tell you only what to do (they even don't tell you where to search) no matter you wonna create somthing super hard or super easy, they simply don't know what is hard and what is easy, as i say they don't know what is the dificult of the things that the other person wonna do. (i don't care you guys get what i am talking about or not i can always find alternative way and i still thing you can do alot of things in GUI)



idodik i am idiot i am still with warcraft 2 exapansion set
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
  • Play sound for player 1 (red)
    • Events
    • Conditions
    • Actions
      • Custom script: if GetLocalPlayer() == Player(0) then
      • Sound - Play mysound <gen>
      • Sound - Play mysound <gen> at 100.00% volume, located at (Center of (Playable map area)) with Z offset 0.00
      • Sound - mysound <gen> at 100.00% volume, attached to footman <gen>
      • Sound - mysound <gen> at 100.00% volume, skipping the first 0.00 seconds
      • Sound - Stop mysound <gen> After fading
      • Sound - Destroy mysound <gen>
      • Sound - Set volume of mysound <gen> to 100.00%
      • Sound - Skip to 0.00 seconds from the start of mysound <gen>
      • Sound - Set cutoff distance of mysound <gen> to 1000.00
      • Sound - Attach mysound <gen> to Footman <gen>
      • Sound - Set position of mysound <gen> to (Center of (Playable map area)) with Z offset 0.00
      • Custom script: endif
Change the first custom script for whatever player you need. Player(0) is player 1 (red), Player(1) is blue, etc.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
You can only play sounds for a specific player with JASS.
Just like you can only display a multiboard for a specific player with JASS.
JASS:
if GetLocalPlayer() == YourPlayer then
    //Place local code here.
    //Do not run anything that influences game play, only graphics or else you will cause OOS (desync)
endif

Replace YourPlayer with anything that returns or gives a player value. That works for a specific player but in a simlar way you can get it to work for a force.
 
Status
Not open for further replies.
Top