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

Text above unit

Status
Not open for further replies.
Level 9
Joined
Aug 11, 2007
Messages
429
How could I make it so when a unit uses a move, say "Suicide" the unit will say one of these options [at random]

"For my country!!!"
"Die fools!!!"
"AHHHHHH!!!"



Its a suicider unit if you haven't guessed.
 
Level 4
Joined
Jun 1, 2007
Messages
92
  • Untitled Trigger 010
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Animate Dead
    • Actions
      • Set RandomInteger = (Random integer number between 1 and 3)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RandomInteger Equal to 1
        • Then - Actions
          • Floating Text - Create floating text that reads I'm a suicider! at (Position of (Casting unit)) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RandomInteger Equal to 2
        • Then - Actions
          • Floating Text - Create floating text that reads Ahhh! I'm emo! at (Position of (Casting unit)) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RandomInteger Equal to 3
        • Then - Actions
          • Floating Text - Create floating text that reads I'm crazy and wanna... at (Position of (Casting unit)) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
        • Else - Actions
There is an easier way, setting the messages into an array variable, but I didn't feel like it so this is all I have.
 
Level 4
Joined
Jun 1, 2007
Messages
92
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • RandomInteger Equal to 1
    • Then - Actions
      • Floating Text - Create floating text that reads I'm a suicider! at (Position of (Casting unit)) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 4.00 seconds
    • Else - Actions
Sorry bout that, change all the if/then/else to something similar to this.
 
Status
Not open for further replies.
Top