• 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.

[Solved] Playing music when specified text is entered

Status
Not open for further replies.
Level 2
Joined
Jul 14, 2012
Messages
15
I seem to have a problem with a trigger that would play PH1.mp3 (Power of the Horde) when a specific chat string is entered. Basically it would work like this:

-Any player enters a specified text string ("TEST" in this case)
-If a unit (any unit in playable area) has a specific ability ("Test ability"), when the player owning the unit enters "TEST" in the chat PH1.mp3 starts playing.

Any ideas?
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Event: A player enters "Test" as an exact match

Pick every unit in (Units owned by Triggering Player) and
-> Level of "Test" for (Picked Unit) is > 0 then
-> Play Music
-> Skip remaining actions.
 
Level 2
Joined
Jul 14, 2012
Messages
15
See, the problem with that is this line:

Event: A player enters "Test" as an exact match.

I can't get the proper event. It requires me to either pick a single player for this event, or an owner of a specific unit.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
It's a single player event. You have to add each player event in the same trigger.
Player 1 types "Test"..
Player 2 types "Test"..
Player 3 types "Test"..
etc..

Alternatively, you can create a "For each integer A from 1 to *Your Max players*" do "Add to Trigger *xxx* the event "Player (Integer A) types "Test" as an exact match". That way, when the map is loading, it will automatically create the events for that trigger. You would just have to add the actions and conditions, since the event will be added on map init.
 
Status
Not open for further replies.
Top