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

Trigger Help

Status
Not open for further replies.
Level 3
Joined
May 16, 2012
Messages
29
1st of all. Hello guys, just registered from a while and i am curious about some stuff :D


I wanted to ask a question about triggers since this is the place for it :D
i wanna make a trigger that when a unit buys the specific hero the owner of hero gains income

Note: Whoever owner is gains the income and i tried Dota template it wasnt useful
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
  • Melee Initialization
    • Events
      • Unit - A unit Sells a unit
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Sold unit)) Equal to Paladin
        • Then - Actions
          • Player - Add 100 to (Owner of (Sold unit)) Current gold
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Sold unit)) Equal to Archmage
            • Then - Actions
              • Player - Add 200 to (Owner of (Sold unit)) Current gold
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of (Sold unit)) Equal to MoreHeroCondition
                • Then - Actions
                  • Player - Add GoldGainForThatHero to (Owner of (Sold unit)) Current gold
                • Else - Actions
Trigger above will give you these;
If you buy a Paladin from a shop (Tavern), you will +100 gold
If you buy an Archmage from a shop(Tavern), you will +200 gold
And so on..
 
Level 3
Joined
May 16, 2012
Messages
29
  • Melee Initialization
    • Events
      • Unit - A unit Sells a unit
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Sold unit)) Equal to Paladin
        • Then - Actions
          • Player - Add 100 to (Owner of (Sold unit)) Current gold
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Sold unit)) Equal to Archmage
            • Then - Actions
              • Player - Add 200 to (Owner of (Sold unit)) Current gold
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of (Sold unit)) Equal to MoreHeroCondition
                • Then - Actions
                  • Player - Add GoldGainForThatHero to (Owner of (Sold unit)) Current gold
                • Else - Actions
Trigger above will give you these;
If you buy a Paladin from a shop (Tavern), you will +100 gold
If you buy an Archmage from a shop(Tavern), you will +200 gold
And so on..

thx for idea bro but its not like income its something that will work once !
 
Status
Not open for further replies.
Top