1. Head to the 33rd Modeling Contest Poll and drink to your heart's desire.
    Dismiss Notice
  2. Choose your means of doom in the 17th Mini Mapping Contest Poll.
    Dismiss Notice
  3. A slave to two rhythms, the 22nd Terraining Contest is here.
    Dismiss Notice
  4. The heavens smile on the old faithful. The 16th Techtree Contest has begun.
    Dismiss Notice
  5. The die is cast - the 6th Melee Mapping Contest results have been announced. Onward to the Hive Cup!
    Dismiss Notice
  6. The glory of the 20th Icon Contest is yours for the taking!
    Dismiss Notice
  7. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Another Trigger Help!

Discussion in 'Triggers & Scripts' started by iAye, Jun 6, 2011.

  1. iAye

    iAye

    Joined:
    May 22, 2011
    Messages:
    65
    Resources:
    1
    Maps:
    1
    Resources:
    1
    • HAMode x KillsTeam1
      • Events
        • Unit - A unit Dies
      • Conditions
        • ((Unit-type of (Dying unit)) is A Hero) Equal to True
        • ((Playable map area) contains (Dying unit)) Equal to True
      • Actions
        • Set HAMode_KillTeam1_Integer = (HAMode_KillTeam1_Integer + 1)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • ((Killing unit) is in HAMode_KillTeam1) Equal to True
          • Then - Actions
            • Player - Add 1 to Player 1 (Red) Food max
            • Player - Add 1 to Player 2 (Blue) Food max
            • Player - Add 1 to Player 3 (Teal) Food max
            • Player - Add 1 to Player 4 (Purple) Food max
            • Player - Add 1 to Player 5 (Yellow) Food max
            • Game - Display to (All players) for 5.00 seconds the text: 1
          • Else - Actions



    Ok heres the deal

    ill set up a hero kill limits , lets just say its 20 kills

    just like in Hero Arena's, when you kill an enemy unit +1 Kills to that killing unit team.

    is this trigger correct??

    please help T_T


    sorry for my bad english ... :ogre_rage:
     
  2. Drazhar

    Drazhar

    Joined:
    May 11, 2010
    Messages:
    213
    Resources:
    0
    Resources:
    0
    Pretty sure that'll work fine as long as you've made the unit group in a different trigger and you've added the player's heroes to it, otherwise this will go off each time any unit kills any hero . Also you don't need
    • ((Playable map area) contains (Dying unit)) Equal to True


    On another note, put these kinds of triggers in the Trigger's and Scripts section (Ones that involve already created triggers)
     
  3. Pharaoh_

    Pharaoh_

    Joined:
    Nov 6, 2008
    Messages:
    8,128
    Resources:
    11
    Icons:
    3
    Skins:
    1
    Spells:
    6
    Tutorials:
    1
    Resources:
    11
    You can use this instead:
    • Death
      • Events
        • Unit - A unit Dies
      • Conditions
        • ((Triggering unit) is A Hero) Equal to True
      • Actions
        • Set Integer = 0
        • For each (Integer Integer) from 1 to 12, do (Actions)
          • Loop - Actions
            • Set WhichPlayer = (Player(Integer))
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (WhichPlayer controller) Equal to User
                • ((Triggering unit) belongs to an enemy of WhichPlayer) Equal to True
              • Then - Actions
                • Player - Add 1 to WhichPlayer Food max
              • Else - Actions

    WhichPlayer is an Player variable and Integer an Integer one.