• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[General] Sound System

Status
Not open for further replies.
Level 15
Joined
Sep 11, 2013
Messages
563
Hi guys!

I want to make an efficient sound system with audio quotes in my map and i want to know..

Is it possible to make it more efficient than i already did?

upload_2020-2-20_7-7-22.png


I need to put in this map like 50 audio quotes and this is just one trigger for 1 quote..

p.s. I don't want to change the editor. 1.21b (6052)

The help will be appreciated :)

Any ideas?
 
Use If Then Else to check if the entered chat string matches with the sound that you want to play.
  • Sound System
    • Events
      • Player - Player 1 (Red) types a chat message containing <empty string> as A Substring
      • Player - Player 2 (Blue) types a chat message containing <empty string> as A Substring
      • Player - Player 3 (Teal) types a chat message containing <empty string> as A Substring
      • Player - Player 4 (Purple) types a chat message containing <empty string> as A Substring
      • Player - Player 5 (Yellow) types a chat message containing <empty string> as A Substring
      • Player - Player 6 (Orange) types a chat message containing <empty string> as A Substring
      • Player - Player 7 (Green) types a chat message containing <empty string> as A Substring
      • Player - Player 8 (Pink) types a chat message containing <empty string> as A Substring
      • Player - Player 9 (Gray) types a chat message containing <empty string> as A Substring
      • Player - Player 10 (Light Blue) types a chat message containing <empty string> as A Substring
      • Player - Player 11 (Dark Green) types a chat message containing <empty string> as A Substring
      • Player - Player 12 (Brown) types a chat message containing <empty string> as A Substring
    • Conditions
    • Actions
      • -------- Sad --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Entered chat string) Equal to sad
        • Then - Actions
          • Sound - Play Sound
          • Game - Display to (All players) the text: Sad :(
        • Else - Actions
      • -------- Happy --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Entered chat string) Equal to happy
        • Then - Actions
          • Sound - Play Sound
          • Game - Display to (All players) the text: Happy :)
        • Else - Actions
      • -------- Angry --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Entered chat string) Equal to angry
        • Then - Actions
          • Sound - Play Sound
          • Game - Display to (All players) the text: Angry !
        • Else - Actions
      • -------- etc --------
 
You can use wait game time for more accurate long waits... prevents counting a time when the game is paused (encountered this before). However, it is said that the function leaks. You may find some workarounds for that.

You can also index the players used on event and use a loop for adding them on trigger event including the chat strings (can be stored on string array too). This can save you a lot of time in making those specified chat string events for that amount of triggers you desired to make.

I do think efficiency is already shown in method above but based on your trigger... You can opt for my option if that doesn't complicate you much (as it seems like you wanted to prevent such audio to be played again (or abusively) by the player by using waits and disabling the specific trigger right)
 
Status
Not open for further replies.
Back
Top