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

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 ?
 
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.
 
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.)))
 
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)
 
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.
 
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.)))
 
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.
Back
Top