• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Complex Talk System Problem

Status
Not open for further replies.
Level 16
Joined
Mar 27, 2011
Messages
1,347
I'm making a talk system for a cinematic I'm making. System uses dynamic indexing for MUI. I'm having some trouble though. Here is the video (ignore the green boarder):



2 problems:

- The first "Talk" from the commander reports a duration of 0. His text can be briefly seen but it fades immediately.

- The Center Marine is suppose to talk DURING the medic's Talk. It doesn't show at all. If I were to put off his Talk until after the Medic finishes, it will show.

Here's my triggers:

  • Talk Start
    • Events
    • Conditions
    • Actions
      • -------- ------- --------
      • -------- Setup Variables --------
      • -------- ------- --------
      • Set Talk_Index = (Talk_Index + 1)
      • Set Talk_Speed[Talk_Index] = 0.07
      • Set Talk_Offset[Talk_Index] = TalkV_Offset
      • Set Talk_Angle[Talk_Index] = TalkV_Angle
      • Set Talk_Duration[Talk_Index] = (Talk_Speed[Talk_Index] x (Real((Length of Talk_Message[Talk_Index]))))
      • Set Talk_Message[Talk_Index] = TalkV_Message
      • Set Talk_MessagePartial[Talk_Index] = |n|n|cffffcc00
      • Set Talk_Unit[Talk_Index] = TalkV_Unit
      • Set Talk_CharacterPosition[Talk_Index] = 1
      • Set Talk_NextCharacter[Talk_Index] = (Substring(Talk_Message[Talk_Index], Talk_CharacterPosition[Talk_Index], Talk_CharacterPosition[Talk_Index]))
      • -------- ------- --------
      • -------- Perform Actions --------
      • -------- ------- --------
      • Game - Display to (All players) for 5.00 seconds the text: (String Duration: + (String(Talk_Duration[Talk_Index])))
      • Set TempPoint = (Position of Talk_Unit[Talk_Index])
      • Set TempPoint2 = (TempPoint offset by Talk_Offset[Talk_Index] towards Talk_Angle[Talk_Index] degrees)
      • Floating Text - Create floating text that reads Talk_MessagePartial[Talk_Index] at TempPoint2 with Z offset 0.00, using font size SpeechFontSizeModifier, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set Talk_FloatingText[Talk_Index] = (Last created floating text)
      • Floating Text - Change Talk_FloatingText[Talk_Index]: Disable permanence
      • Floating Text - Change the fading age of Talk_FloatingText[Talk_Index] to Talk_Duration[Talk_Index] seconds
      • Floating Text - Change the lifespan of Talk_FloatingText[Talk_Index] to (Talk_Duration[Talk_Index] + 1.00) seconds
      • Cinematic - Flash a speech indicator for Talk_Unit[Silence_Index] of color (100.00%, 100.00%, 100.00%) with 0.00% transparency
      • Custom script: call RemoveLocation (udg_TempPoint)
      • Custom script: call RemoveLocation (udg_TempPoint2)
      • -------- ------- --------
      • -------- Turn on Loop --------
      • -------- ------- --------
      • Set Talk_LoopCounter[Talk_LoopInteger] = 0.00
      • Set Talk_CharacterTimer[Talk_LoopInteger] = 0.00
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Talk_Index Equal to 1
        • Then - Actions
          • Trigger - Turn on Talk Loop <gen>
        • Else - Actions
  • Talk Loop
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • -------- Loops for all instances of talk --------
      • For each (Integer Talk_LoopInteger) from 1 to Talk_Index, do (Actions)
        • Loop - Actions
          • -------- Increments talk counters --------
          • Set Talk_LoopCounter[Talk_LoopInteger] = (Talk_LoopCounter[Talk_LoopInteger] + 0.01)
          • Set Talk_CharacterTimer[Talk_LoopInteger] = (Talk_CharacterTimer[Talk_LoopInteger] + 0.01)
          • -------- Checks if its time to display the next character --------
          • -------- 0.06 timer for characters --------
          • -------- 0.01 timer for spaces --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • Talk_NextCharacter[Talk_LoopInteger] Equal to
                      • Talk_CharacterTimer[Talk_LoopInteger] Greater than or equal to 0.01
                  • And - All (Conditions) are true
                    • Conditions
                      • Talk_NextCharacter[Talk_LoopInteger] Not equal to
                      • Talk_CharacterTimer[Talk_LoopInteger] Greater than or equal to 0.06
            • Then - Actions
              • -------- Appends the next character to the Speech --------
              • Set Talk_MessagePartial[Talk_LoopInteger] = (Talk_MessagePartial[Talk_LoopInteger] + Talk_NextCharacter[Talk_LoopInteger])
              • Floating Text - Change text of Talk_FloatingText[Talk_LoopInteger] to Talk_MessagePartial[Talk_LoopInteger] using font size 10.00
              • -------- Resets the timer and counts 1 position in the String --------
              • Set Talk_CharacterTimer[Talk_LoopInteger] = 0.00
              • Set Talk_CharacterPosition[Talk_LoopInteger] = (Talk_CharacterPosition[Talk_LoopInteger] + 1)
              • -------- Previews Next Character --------
              • Set Talk_NextCharacter[Talk_LoopInteger] = (Substring(Talk_Message[Talk_LoopInteger], Talk_CharacterPosition[Talk_LoopInteger], Talk_CharacterPosition[Talk_LoopInteger]))
              • -------- Checks if time has ended --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Talk_LoopCounter[Talk_LoopInteger] Greater than or equal to (Talk_Duration[Talk_LoopInteger] + 1.00)
                • Then - Actions
                  • Game - Display to (All players) for 5.00 seconds the text: Reindexing!
                  • -------- All Talk instances are re-indexed --------
                  • Set Talk_Unit[Talk_LoopInteger] = Talk_Unit[Talk_Index]
                  • Set Talk_Unit[Talk_Index] = No unit
                  • Set Talk_FloatingText[Talk_LoopInteger] = Talk_FloatingText[Talk_Index]
                  • Set Talk_Message[Talk_LoopInteger] = Talk_Message[Talk_Index]
                  • Set Talk_MessagePartial[Talk_LoopInteger] = Talk_MessagePartial[Talk_Index]
                  • Set Talk_NextCharacter[Talk_LoopInteger] = Talk_NextCharacter[Talk_Index]
                  • Set Talk_CharacterPosition[Talk_LoopInteger] = Talk_CharacterPosition[Talk_Index]
                  • Set Talk_LoopCounter[Talk_LoopInteger] = Talk_LoopCounter[Talk_Index]
                  • Set Talk_CharacterTimer[Talk_LoopInteger] = Talk_CharacterTimer[Talk_Index]
                  • Set Talk_Speed[Talk_LoopInteger] = Talk_Offset[Talk_Index]
                  • Set Talk_Duration[Talk_LoopInteger] = Talk_Duration[Talk_Index]
                  • Set Talk_Offset[Talk_LoopInteger] = Talk_Offset[Talk_Index]
                  • Set Talk_Angle[Talk_LoopInteger] = Talk_Angle[Talk_Index]
                  • Set Talk_Index = (Talk_Index - 1)
                  • Set Talk_LoopInteger = (Talk_LoopInteger - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Talk_Index Equal to 0
                    • Then - Actions
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
                • Else - Actions
            • Else - Actions
  • test talk
    • Events
      • Player - Player 1 (Red) types a chat message containing talk as An exact match
    • Conditions
    • Actions
      • Cinematic - Turn cinematic mode On for (All players)
      • Camera - Apply Spaceship Window 3 <gen> for Player 1 (Red) over 0.00 seconds
      • Unit - Order Marauder 0005 <gen> to Move To (Center of Spaceship Marauder Move <gen>)
      • Wait until ((Spaceship Marauder Move <gen> contains Marauder 0005 <gen>) Equal to True), checking every 0.10 seconds
      • Set TalkV_Message = John:|r We're almost there...
      • Set TalkV_Unit = Commander 0006 <gen>
      • Set TalkV_Angle = 90.00
      • Set TalkV_Offset = 512.00
      • Trigger - Run Talk Start <gen> (ignoring conditions)
      • Wait 4.00 seconds
      • Set TalkV_Message = Joey:|r We should be there and back in no time!
      • Set TalkV_Unit = Marauder 0005 <gen>
      • Set TalkV_Angle = 148.00
      • Set TalkV_Offset = 220.00
      • Trigger - Run Talk Start <gen> (ignoring conditions)
      • Wait 5.00 seconds
      • Set TalkV_Message = Trace:|r Easy boys, lets just make this a safe trip!
      • Set TalkV_Unit = Medic 0007 <gen>
      • Set TalkV_Angle = 512.00
      • Set TalkV_Offset = 90.00
      • Trigger - Run Talk Start <gen> (ignoring conditions)
      • Wait 1.00 seconds
      • Set TalkV_Message = John:|r Yeah, yeah Trace!
      • Set TalkV_Unit = Commander 0006 <gen>
      • Set TalkV_Angle = 90.00
      • Set TalkV_Offset = 512.00
      • Trigger - Run Talk Start <gen> (ignoring conditions)
      • Wait 4.00 seconds
      • Cinematic - Turn cinematic mode Off for (All players)
 
Status
Not open for further replies.
Back
Top