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

Random Comments

Status
Not open for further replies.
Level 19
Joined
Jun 29, 2009
Messages
6,759
Hey guys, me and two other users here on the hive have recently started a campaign project and one of the special features is that the 6 playable heroes will say random comments everytime casting a spell.

Are there anyone of you who knows how to create triggers for when each spell is activated, a random comment from a list of three or more comments is selected and said? :)

- Amargaard
 
  • Untitled Trigger 003
    • Events
      • Map initialization
    • Conditions
    • Actions
      • // String variable
      • Set Comments[0] = Yo
      • Set Comments[1] = Momma
      • Set Comments[2] = Fat
  • Untitled Trigger 004
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to *ability*
    • Actions
      • Game - Display to (All players) for 5.00 seconds the text: Comments[(Random integer number between 0 and 2)]
 
Nope, actually I want the Cinematic version where you can see the portrait talk meanwhile :P
Didn't work. Here's what I did to my triggers:

Untitled Trigger 004
Events:
Unit - *Unit* Starts the effect of an ability
Conditions:
(Ability being cast) Equal to *ability*
Actions:
Cinematic - Send transmission to (All Players) from *Unit* named *name*: Play *no sound* and display *Name_Comment*[Random interigor number between 0 and 2]

Untitled Trigger 003
Events:
Conditions:
Actions:
Set Name_Comment[0] = Yo
Set Name_Comment[1] = Momma
Set Name_Comment[2] = Fat

The Variable
Type: String
Arrey: 2

What's wrong? :/
 
Oh then that is my problem! Thanks, rep for that :P

Hmm... another question. In-game the comment is not shown, the portrait plays it's talk animation, but the comment is invisible. However when I go to the Chat-log I can see it. Strange O.O
 
Status
Not open for further replies.
Back
Top