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

Speech and Hero

Status
Not open for further replies.
Level 3
Joined
Jun 18, 2010
Messages
33
Hello, I need a trigger that randomizes one voice and one hero, and then adds them together. For ex. Voice 2 goes to Hero5. All 5 sounds and 5 Heroes must join together. No same speech to 2 diffrend heroes, just one voice to one hero! But the Voice is randomized as Hero too.
Heres a example how it could go:
Voice1 = Hero4
Voice4 = Hero2
Voice5 = Hero3
Voice2 = Hero1
Voice3 = Hero5

Here's my fail trigger:
  • CineSpeechInteger
    • Events
    • Conditions
      • CineSpeecherRunned Not equal to 5
    • Actions
      • Set Integer = (Random integer number between 1 and 5)
      • Trigger - Run CineSpeech <gen> (checking conditions)
  • CineSpeech
    • Events
    • Conditions
    • Actions
      • If (CineSpeecherUsed[1] Equal to Integer) then do (Trigger - Run CineSpeechInteger <gen> (checking conditions)) else do (Do nothing)
      • If (CineSpeecherUsed[1] Equal to Integer) then do (Skip remaining actions) else do (Do nothing)
      • If (CineSpeecherUsed[2] Equal to Integer) then do (Trigger - Run CineSpeechInteger <gen> (checking conditions)) else do (Do nothing)
      • If (CineSpeecherUsed[2] Equal to Integer) then do (Skip remaining actions) else do (Do nothing)
      • If (CineSpeecherUsed[3] Equal to Integer) then do (Trigger - Run CineSpeechInteger <gen> (checking conditions)) else do (Do nothing)
      • If (CineSpeecherUsed[3] Equal to Integer) then do (Skip remaining actions) else do (Do nothing)
      • If (CineSpeecherUsed[4] Equal to Integer) then do (Trigger - Run CineSpeechInteger <gen> (checking conditions)) else do (Do nothing)
      • If (CineSpeecherUsed[4] Equal to Integer) then do (Skip remaining actions) else do (Do nothing)
      • If (CineSpeecherUsed[5] Equal to Integer) then do (Trigger - Run CineSpeechInteger <gen> (checking conditions)) else do (Do nothing)
      • If (CineSpeecherUsed[5] Equal to Integer) then do (Skip remaining actions) else do (Do nothing)
      • Set CineSpeecherRunned = (CineSpeecherRunned + 1)
      • Set CineSpeecherUsed[CineSpeecherRunned] = Integer
      • Set Hero[Integer] = CineSpeecher[CineSpeecherRunned]
      • Trigger - Run CineSpeechInteger <gen> (checking conditions)
 
Level 5
Joined
Jan 4, 2007
Messages
103
Try this:

  • Actions
    • Set Sound1(Your Sound) = Sound[1](Variable With Array)
    • Set Sound2 = Sound[2]
    • Set Sound3 = Sound[3]
    • ect.
    • Unit Group - Add Hero1(Your Hero) to Hero_Group(Variable)
    • Unit Group - Add Hero2 to Hero_Group
    • Unit Group - Add Hero3 to Hero_Group
    • ect.
    • For each (Integer A) from 1 to 5, do (Actions)
      • Loop - Actions
        • Unit Group - Pick every unit in (Random 1 units from Hero_Group) and do (Actions)
          • Loop - Actions
            • Add Sound[Integer A] to Picked Unit
            • Unit Group - Remove (Picked Unit) from Hero_Group
    • Custom script: call DestroyGroup (udg_Hero_Group)
Hope it helps:)
 
Status
Not open for further replies.
Top