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

First blood trigger - help me here plz ;)

Status
Not open for further replies.
Level 8
Joined
Aug 8, 2011
Messages
297
  • First Blood
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacked unit) is A Hero) Equal to True
      • ((Attacking unit) is A Hero) Equal to True
      • ((Owner of (Attacking unit)) is an enemy of (Owner of (Attacked unit))) Equal to True
    • Actions
      • Trigger - Turn off (This trigger)
      • Player - Add 200 to (Owner of (Attacking unit)) Current gold
      • Quest - Display to Players the Hint message: ((|cff00ccffFirst Blood|r - + PlayerNames[(Player number of (Owner of (Attacked unit)))]) + ( 's blood has been spilled by + (PlayerNames[(Player number of (Owner of (Attacking unit)))] + for an additional 200 Gold.)))

why dont this trigger work ? and where can i get a first blood sound ?
 
Level 5
Joined
Feb 3, 2012
Messages
107
u have to use and conditions or else the conditions would not work. goto conditions again and go to the bottom of the conditions list. u will see 'And, Multiple Conditions'. place that in and put the conditions uve just made under the multiple conditions and walla it works!
P.S. it doesnt matter where u put Trigger turn off it will always work.
 
Level 8
Joined
Aug 8, 2011
Messages
297
like this ?

  • First Blood
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • And - All (Conditions) are true
        • Conditions
      • ((Attacked unit) is A Hero) Equal to True
      • ((Attacking unit) is A Hero) Equal to True
      • ((Owner of (Attacking unit)) is an enemy of (Owner of (Attacked unit))) Equal to True
    • Actions
      • Trigger - Turn off (This trigger)
      • Player - Add 200 to (Owner of (Attacking unit)) Current gold
      • Quest - Display to Players the Hint message: ((|cff00ccffFirst Blood|r - + PlayerNames[(Player number of (Owner of (Attacked unit)))]) + ( 's blood has been spilled by + (PlayerNames[(Player number of (Owner of (Attacking unit)))] + for an additional 200 Gold.)))
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
this workwhen u hit 1st time not when u kill :p

u se unit dies event for firstblood like this
  • Untitled Trigger 002
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
      • ((Killing unit) is A Hero) Equal to True
      • ((Killing unit) belongs to an enemy of (Triggering player)) Equal to True
    • Actions
      • Player - Add 200 to (Owner of (Killing unit)) Current gold
      • Game - Display to (All players) the text: killing msg bla bla
      • Trigger - Turn off (This trigger)
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
u have to use and conditions or else the conditions would not work

No, it is better to leave out the extra AND

  • Untitled Trigger 001 Copy 2 Copy
    • Events
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Triggering unit) is A Hero) Equal to True
          • ((Triggering unit) is A ground unit) Equal to True
    • Actions
  • Untitled Trigger 001 Copy 2
    • Events
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • ((Triggering unit) is A ground unit) Equal to True
    • Actions


The second trigger is better as it creates less code and thus runs faster.
 
Level 3
Joined
Apr 6, 2012
Messages
22
like this ?

  • First Blood
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • And - All (Conditions) are true
        • Conditions
      • ((Attacked unit) is A Hero) Equal to True
      • ((Attacking unit) is A Hero) Equal to True
      • ((Owner of (Attacking unit)) is an enemy of (Owner of (Attacked unit))) Equal to True
    • Actions
      • Trigger - Turn off (This trigger)
      • Player - Add 200 to (Owner of (Attacking unit)) Current gold
      • Quest - Display to Players the Hint message: ((|cff00ccffFirst Blood|r - + PlayerNames[(Player number of (Owner of (Attacked unit)))]) + ( 's blood has been spilled by + (PlayerNames[(Player number of (Owner of (Attacking unit)))] + for an additional 200 Gold.)))

Close, but no cigar. The and condition is completely useless where you put it. This is how it should look:
  • First Blood
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Attacked unit) is A Hero) Equal to True
          • ((Attacking unit) is A Hero) Equal to True
          • ((Owner of (Attacking unit)) is an enemy of (Owner of (Attacked unit))) Equal to True
    • Actions
      • Trigger - Turn off (This trigger)
      • Player - Add 200 to (Owner of (Attacking unit)) Current gold
      • Quest - Display to Players the Hint message: ((|cff00ccffFirst Blood|r - + PlayerNames[(Player number of (Owner of (Attacked unit)))]) + ( 's blood has been spilled by + (PlayerNames[(Player number of (Owner of (Attacking unit)))] + for an additional 200 Gold.)))
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Because if you doesn't use AND or OR multiple conditions and you stack the condition one line after another, it will obey the AND result, not OR

So, follow what Maker had stated, don't use multiple OR or AND, instead just add one line after another, the same result will apply only efficiency that matters
 
Status
Not open for further replies.
Top