• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Help me improve this

Status
Not open for further replies.
Level 7
Joined
May 18, 2010
Messages
264
My eyes are bleeding..
For the first time in my life is a trigger so long that code line coudln't move to right anylonger and came back to default once again - many times.
You are a pro with killing triggers :D

Let's start with.. DIVIDE YOUR trigger a bit to smaller parts and use hidden tag for each of them.
^^ its 2x it size i removed the MS/ATK speed and Ability Power ^^
yy i gona split it in 6 triggers for start

edit: found bug with dmg,,, its = number i need greater or = number


EDIT:2
BIG ass bug

  • Stats HP
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • Do Multiple ActionsFor each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • Set StatsHerHP = (StatsSTA[(Integer A)] x 5)
          • Game - Display to (Player group(Players[(Integer A)])) the text: (String(StatsHerHP))
          • Unit - Remove Item Life Bonus 1 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 10 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 100 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 2 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 20 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 200 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 3 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 30 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 300 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 4 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 40 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 400 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 5 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 50 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 500 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 6 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 60 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 7 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 70 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 8 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 80 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 9 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 90 from Heroes[(Integer A)]
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • StatsHerHP Greater than or equal to (>=) 500
              • Then - Actions
                • Unit - Add Item Life Bonus 500 to Heroes[(Integer A)]
                • Set StatsHerHP = (StatsHerHP - 500)
              • Else - Actions
                • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • StatsHerHP Greater than or equal to (>=) 400
                  • Then - Actions
                    • Unit - Add Item Life Bonus 400 to Heroes[(Integer A)]
                    • Set StatsHerHP = (StatsHerHP - 400)
                  • Else - Actions
                    • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • StatsHerHP Greater than or equal to (>=) 300
                      • Then - Actions
                        • Unit - Add Item Life Bonus 300 to Heroes[(Integer A)]
                        • Set StatsHerHP = (StatsHerHP - 300)
                      • Else - Actions
                        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • StatsHerHP Greater than or equal to (>=) 200
                          • Then - Actions
                            • Unit - Add Item Life Bonus 200 to Heroes[(Integer A)]
                            • Set StatsHerHP = (StatsHerHP - 200)
                          • Else - Actions
                            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                              • If - Conditions
                                • StatsHerHP Greater than or equal to (>=) 100
                              • Then - Actions
                                • Unit - Add Item Life Bonus 100 to Heroes[(Integer A)]
                                • Set StatsHerHP = (StatsHerHP - 100)
                              • Else - Actions
                                • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                  • If - Conditions
                                    • StatsHerHP Greater than or equal to (>=) 90
                                  • Then - Actions
                                    • Unit - Add Item Life Bonus 90 to Heroes[(Integer A)]
                                    • Set StatsHerHP = (StatsHerHP - 90)
                                  • Else - Actions
                                    • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                      • If - Conditions
                                        • StatsHerHP Greater than or equal to (>=) 80
                                      • Then - Actions
                                        • Unit - Add Item Life Bonus 80 to Heroes[(Integer A)]
                                        • Set StatsHerHP = (StatsHerHP - 80)
                                      • Else - Actions
                                        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                          • If - Conditions
                                            • StatsHerHP Greater than or equal to (>=) 70
                                          • Then - Actions
                                            • Unit - Add Item Life Bonus 70 to Heroes[(Integer A)]
                                            • Set StatsHerHP = (StatsHerHP - 70)
                                          • Else - Actions
                                            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                              • If - Conditions
                                                • StatsHerHP Greater than or equal to (>=) 60
                                              • Then - Actions
                                                • Unit - Add Item Life Bonus 60 to Heroes[(Integer A)]
                                                • Set StatsHerHP = (StatsHerHP - 60)
                                              • Else - Actions
                                                • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                  • If - Conditions
                                                    • StatsHerHP Greater than or equal to (>=) 50
                                                  • Then - Actions
                                                    • Unit - Add Item Life Bonus 50 to Heroes[(Integer A)]
                                                    • Set StatsHerHP = (StatsHerHP - 50)
                                                  • Else - Actions
                                                    • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                      • If - Conditions
                                                        • StatsHerHP Greater than or equal to (>=) 40
                                                      • Then - Actions
                                                        • Unit - Add Item Life Bonus 40 to Heroes[(Integer A)]
                                                        • Set StatsHerHP = (StatsHerHP - 40)
                                                      • Else - Actions
                                                        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                          • If - Conditions
                                                            • StatsHerHP Greater than or equal to (>=) 30
                                                          • Then - Actions
                                                            • Unit - Add Item Life Bonus 30 to Heroes[(Integer A)]
                                                            • Set StatsHerHP = (StatsHerHP - 30)
                                                          • Else - Actions
                                                            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                              • If - Conditions
                                                                • StatsHerHP Greater than or equal to (>=) 20
                                                              • Then - Actions
                                                                • Unit - Add Item Life Bonus 20 to Heroes[(Integer A)]
                                                                • Set StatsHerHP = (StatsHerHP - 20)
                                                              • Else - Actions
                                                                • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                  • If - Conditions
                                                                    • StatsHerHP Greater than or equal to (>=) 10
                                                                  • Then - Actions
                                                                    • Unit - Add Item Life Bonus 10 to Heroes[(Integer A)]
                                                                    • Set StatsHerHP = (StatsHerHP - 10)
                                                                  • Else - Actions
                                                                    • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                      • If - Conditions
                                                                        • StatsHerHP Greater than or equal to (>=) 9
                                                                      • Then - Actions
                                                                        • Unit - Add Item Life Bonus 9 to Heroes[(Integer A)]
                                                                        • Set StatsHerHP = (StatsHerHP - 9)
                                                                      • Else - Actions
                                                                        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                          • If - Conditions
                                                                            • StatsHerHP Greater than or equal to (>=) 8
                                                                          • Then - Actions
                                                                            • Unit - Add Item Life Bonus 8 to Heroes[(Integer A)]
                                                                            • Set StatsHerHP = (StatsHerHP - 8)
                                                                          • Else - Actions
                                                                            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                              • If - Conditions
                                                                                • StatsHerHP Greater than or equal to (>=) 7
                                                                              • Then - Actions
                                                                                • Unit - Add Item Life Bonus 7 to Heroes[(Integer A)]
                                                                                • Set StatsHerHP = (StatsHerHP - 7)
                                                                              • Else - Actions
                                                                                • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                  • If - Conditions
                                                                                    • StatsHerHP Greater than or equal to (>=) 6
                                                                                  • Then - Actions
                                                                                    • Unit - Add Item Life Bonus 6 to Heroes[(Integer A)]
                                                                                    • Set StatsHerHP = (StatsHerHP - 6)
                                                                                  • Else - Actions
                                                                                    • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                      • If - Conditions
                                                                                        • StatsHerHP Greater than or equal to (>=) 5
                                                                                      • Then - Actions
                                                                                        • Unit - Add Item Life Bonus 5 to Heroes[(Integer A)]
                                                                                        • Set StatsHerHP = (StatsHerHP - 5)
                                                                                      • Else - Actions
                                                                                        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                          • If - Conditions
                                                                                            • StatsHerHP Greater than or equal to (>=) 4
                                                                                          • Then - Actions
                                                                                            • Unit - Add Item Life Bonus 4 to Heroes[(Integer A)]
                                                                                            • Set StatsHerHP = (StatsHerHP - 4)
                                                                                          • Else - Actions
                                                                                            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                              • If - Conditions
                                                                                                • StatsHerHP Greater than or equal to (>=) 3
                                                                                              • Then - Actions
                                                                                                • Unit - Add Item Life Bonus 3 to Heroes[(Integer A)]
                                                                                                • Set StatsHerHP = (StatsHerHP - 3)
                                                                                              • Else - Actions
                                                                                                • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                                  • If - Conditions
                                                                                                    • StatsHerHP Greater than or equal to (>=) 2
                                                                                                  • Then - Actions
                                                                                                    • Unit - Add Item Life Bonus 2 to Heroes[(Integer A)]
                                                                                                    • Set StatsHerHP = (StatsHerHP - 2)
                                                                                                  • Else - Actions
                                                                                                    • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                                      • If - Conditions
                                                                                                        • StatsHerHP Greater than or equal to (>=) 1
                                                                                                      • Then - Actions
                                                                                                        • Unit - Add Item Life Bonus 1 to Heroes[(Integer A)]
                                                                                                        • Set StatsHerHP = (StatsHerHP - 1)
                                                                                                      • Else - Actions
                                                                                                        • Game - Display to (Player group(Players[(Integer A)])) the text: (String(StatsHerHP))
So the problem is that EX (HerHP=75)it goes on until it hits
HerHP Greater or = to 70
Then actions
...adds 70hp
but there the trigger stops..(HerHp=5) left
but it dosent continue
 
Last edited:

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
My eyes are bleeding..
For the first time in my life is a trigger so long that code line coudln't move to right anylonger and came back to default once again - many times.
You are a pro with killing triggers :D

Let's start with.. DIVIDE YOUR trigger a bit to smaller parts and use hidden tag for each of them.
 
Level 7
Joined
May 18, 2010
Messages
264
My eyes are bleeding..
For the first time in my life is a trigger so long that code line coudln't move to right anylonger and came back to default once again - many times.
You are a pro with killing triggers :D

Let's start with.. DIVIDE YOUR trigger a bit to smaller parts and use hidden tag for each of them.
^^ its 2x it size i removed the MS/ATK speed and Ability Power ^^
yy i gona split it in 6 triggers for start

edit: found bug with dmg,,, its = number i need greater or = number


EDIT:2
BIG ass bug

  • Stats HP
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • Do Multiple ActionsFor each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • Set StatsHerHP = (StatsSTA[(Integer A)] x 5)
          • Game - Display to (Player group(Players[(Integer A)])) the text: (String(StatsHerHP))
          • Unit - Remove Item Life Bonus 1 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 10 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 100 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 2 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 20 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 200 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 3 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 30 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 300 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 4 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 40 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 400 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 5 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 50 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 500 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 6 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 60 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 7 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 70 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 8 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 80 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 9 from Heroes[(Integer A)]
          • Unit - Remove Item Life Bonus 90 from Heroes[(Integer A)]
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • StatsHerHP Greater than or equal to (>=) 500
              • Then - Actions
                • Unit - Add Item Life Bonus 500 to Heroes[(Integer A)]
                • Set StatsHerHP = (StatsHerHP - 500)
              • Else - Actions
                • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • StatsHerHP Greater than or equal to (>=) 400
                  • Then - Actions
                    • Unit - Add Item Life Bonus 400 to Heroes[(Integer A)]
                    • Set StatsHerHP = (StatsHerHP - 400)
                  • Else - Actions
                    • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • StatsHerHP Greater than or equal to (>=) 300
                      • Then - Actions
                        • Unit - Add Item Life Bonus 300 to Heroes[(Integer A)]
                        • Set StatsHerHP = (StatsHerHP - 300)
                      • Else - Actions
                        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • StatsHerHP Greater than or equal to (>=) 200
                          • Then - Actions
                            • Unit - Add Item Life Bonus 200 to Heroes[(Integer A)]
                            • Set StatsHerHP = (StatsHerHP - 200)
                          • Else - Actions
                            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                              • If - Conditions
                                • StatsHerHP Greater than or equal to (>=) 100
                              • Then - Actions
                                • Unit - Add Item Life Bonus 100 to Heroes[(Integer A)]
                                • Set StatsHerHP = (StatsHerHP - 100)
                              • Else - Actions
                                • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                  • If - Conditions
                                    • StatsHerHP Greater than or equal to (>=) 90
                                  • Then - Actions
                                    • Unit - Add Item Life Bonus 90 to Heroes[(Integer A)]
                                    • Set StatsHerHP = (StatsHerHP - 90)
                                  • Else - Actions
                                    • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                      • If - Conditions
                                        • StatsHerHP Greater than or equal to (>=) 80
                                      • Then - Actions
                                        • Unit - Add Item Life Bonus 80 to Heroes[(Integer A)]
                                        • Set StatsHerHP = (StatsHerHP - 80)
                                      • Else - Actions
                                        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                          • If - Conditions
                                            • StatsHerHP Greater than or equal to (>=) 70
                                          • Then - Actions
                                            • Unit - Add Item Life Bonus 70 to Heroes[(Integer A)]
                                            • Set StatsHerHP = (StatsHerHP - 70)
                                          • Else - Actions
                                            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                              • If - Conditions
                                                • StatsHerHP Greater than or equal to (>=) 60
                                              • Then - Actions
                                                • Unit - Add Item Life Bonus 60 to Heroes[(Integer A)]
                                                • Set StatsHerHP = (StatsHerHP - 60)
                                              • Else - Actions
                                                • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                  • If - Conditions
                                                    • StatsHerHP Greater than or equal to (>=) 50
                                                  • Then - Actions
                                                    • Unit - Add Item Life Bonus 50 to Heroes[(Integer A)]
                                                    • Set StatsHerHP = (StatsHerHP - 50)
                                                  • Else - Actions
                                                    • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                      • If - Conditions
                                                        • StatsHerHP Greater than or equal to (>=) 40
                                                      • Then - Actions
                                                        • Unit - Add Item Life Bonus 40 to Heroes[(Integer A)]
                                                        • Set StatsHerHP = (StatsHerHP - 40)
                                                      • Else - Actions
                                                        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                          • If - Conditions
                                                            • StatsHerHP Greater than or equal to (>=) 30
                                                          • Then - Actions
                                                            • Unit - Add Item Life Bonus 30 to Heroes[(Integer A)]
                                                            • Set StatsHerHP = (StatsHerHP - 30)
                                                          • Else - Actions
                                                            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                              • If - Conditions
                                                                • StatsHerHP Greater than or equal to (>=) 20
                                                              • Then - Actions
                                                                • Unit - Add Item Life Bonus 20 to Heroes[(Integer A)]
                                                                • Set StatsHerHP = (StatsHerHP - 20)
                                                              • Else - Actions
                                                                • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                  • If - Conditions
                                                                    • StatsHerHP Greater than or equal to (>=) 10
                                                                  • Then - Actions
                                                                    • Unit - Add Item Life Bonus 10 to Heroes[(Integer A)]
                                                                    • Set StatsHerHP = (StatsHerHP - 10)
                                                                  • Else - Actions
                                                                    • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                      • If - Conditions
                                                                        • StatsHerHP Greater than or equal to (>=) 9
                                                                      • Then - Actions
                                                                        • Unit - Add Item Life Bonus 9 to Heroes[(Integer A)]
                                                                        • Set StatsHerHP = (StatsHerHP - 9)
                                                                      • Else - Actions
                                                                        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                          • If - Conditions
                                                                            • StatsHerHP Greater than or equal to (>=) 8
                                                                          • Then - Actions
                                                                            • Unit - Add Item Life Bonus 8 to Heroes[(Integer A)]
                                                                            • Set StatsHerHP = (StatsHerHP - 8)
                                                                          • Else - Actions
                                                                            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                              • If - Conditions
                                                                                • StatsHerHP Greater than or equal to (>=) 7
                                                                              • Then - Actions
                                                                                • Unit - Add Item Life Bonus 7 to Heroes[(Integer A)]
                                                                                • Set StatsHerHP = (StatsHerHP - 7)
                                                                              • Else - Actions
                                                                                • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                  • If - Conditions
                                                                                    • StatsHerHP Greater than or equal to (>=) 6
                                                                                  • Then - Actions
                                                                                    • Unit - Add Item Life Bonus 6 to Heroes[(Integer A)]
                                                                                    • Set StatsHerHP = (StatsHerHP - 6)
                                                                                  • Else - Actions
                                                                                    • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                      • If - Conditions
                                                                                        • StatsHerHP Greater than or equal to (>=) 5
                                                                                      • Then - Actions
                                                                                        • Unit - Add Item Life Bonus 5 to Heroes[(Integer A)]
                                                                                        • Set StatsHerHP = (StatsHerHP - 5)
                                                                                      • Else - Actions
                                                                                        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                          • If - Conditions
                                                                                            • StatsHerHP Greater than or equal to (>=) 4
                                                                                          • Then - Actions
                                                                                            • Unit - Add Item Life Bonus 4 to Heroes[(Integer A)]
                                                                                            • Set StatsHerHP = (StatsHerHP - 4)
                                                                                          • Else - Actions
                                                                                            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                              • If - Conditions
                                                                                                • StatsHerHP Greater than or equal to (>=) 3
                                                                                              • Then - Actions
                                                                                                • Unit - Add Item Life Bonus 3 to Heroes[(Integer A)]
                                                                                                • Set StatsHerHP = (StatsHerHP - 3)
                                                                                              • Else - Actions
                                                                                                • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                                  • If - Conditions
                                                                                                    • StatsHerHP Greater than or equal to (>=) 2
                                                                                                  • Then - Actions
                                                                                                    • Unit - Add Item Life Bonus 2 to Heroes[(Integer A)]
                                                                                                    • Set StatsHerHP = (StatsHerHP - 2)
                                                                                                  • Else - Actions
                                                                                                    • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                                      • If - Conditions
                                                                                                        • StatsHerHP Greater than or equal to (>=) 1
                                                                                                      • Then - Actions
                                                                                                        • Unit - Add Item Life Bonus 1 to Heroes[(Integer A)]
                                                                                                        • Set StatsHerHP = (StatsHerHP - 1)
                                                                                                      • Else - Actions
                                                                                                        • Game - Display to (Player group(Players[(Integer A)])) the text: (String(StatsHerHP))
So the problem is that EX (HerHP=75)it goes on until it hits
HerHP Greater or = to 70
Then actions
...adds 70hp
but there the trigger stops..(HerHp=5) left
but it dosent continue
 
Last edited:
Level 7
Joined
May 18, 2010
Messages
264
First of all, describe what the trigger is supposed to do.

Then you can delete your trigger and we'll help you to make a better one.
OK.
In start of a game
a player picks a hero
Each hero has 1attack damage 1 hp 1mana...
  • Heroes
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • Multiple ConditionsOr - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Sold unit)) Equal to (==) |cff008000Ranger|r
          • (Unit-type of (Sold unit)) Equal to (==) |cff008000Knight|r
    • Actions
      • Set Heroes[(Player number of (Owner of (Sold unit)))] = (Sold unit)
      • Set StatsSTA[(Player number of (Owner of (Sold unit)))] = 1
      • Set StatsSTR[(Player number of (Owner of (Sold unit)))] = 1
      • Set StatsAGI[(Player number of (Owner of (Sold unit)))] = 1
      • Set StatsDEX[(Player number of (Owner of (Sold unit)))] = 1
      • Set StatsINT[(Player number of (Owner of (Sold unit)))] = 1
      • Set StatsWIS[(Player number of (Owner of (Sold unit)))] = 1
then as game progress with each (quest,level,items)
U gain stats(Sta,Str,Agi,Dex,Int,Wis) lets keap it simple sta=hp str=dmg
When u gain EX:sta(7) i need a hero to gain 7 hp
i use
  • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • StatsHerHP Greater than or equal to (>=) 500
    • Then - Actions
      • Unit - Add Item Life Bonus 500 to Heroes[(Integer A)]
      • Set StatsHerHP = (StatsHerHP - 500)
    • Else - Actions
Cuz Item life bonus cant use LEVELS(ani other way to modify HP)
My trigger is LONG. but it does what it should do
Didnt test it with 8players but i think it will cause lag since i got 8of them(HP , MP , DMG , AtkSpeed , MovSpeed , Armor , Magic damage , Heal Magic )

Basicly i need to Modifiy HP,MP,dmg,ATKspeed with Trigger's
help me make a good one
 
Level 29
Joined
Mar 10, 2009
Messages
5,016
to make it better, you should put the 500/400/300/200/100 to a variable and loop it...

init:
SampleInt = 500

sample:
  • If - Conditions
    • StatsHerHP Greater than or equal to (>=) SampleInt
    • Then - Actions
    • Unit - Add Item Life Bonus SampleInt to Heroes[(Integer A)]
    • Set StatsHerHP = (StatsHerHP - SampleInt)
    • Set SampleInt = SampleInt-100
 
Level 7
Joined
May 18, 2010
Messages
264
  • Unit - Add Item Life Bonus SampleInt to Heroes[(Integer A)]
[/QUOTE]
i dont get how to make this

EDIT: Btw i just made decision Insted of 200000 abilties il make STR = HP INT = MP
and per str = 1 hp ...

EDIT: Case Closed
i dump this idea
 
Last edited:
Status
Not open for further replies.
Top