Trigger bug /:

kla0005

New Member
Reaction score
3
Hey Guys,

I have an trigger that auto level increases the Atribute Bonus..
It looks like this:
Trigger:
  • IncreaseAttributeBonus
    • Events
      • Unit - A unit Gains a level
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (hero[(Integer A)] is A Hero) Equal to True
              • ((Player((Integer A))) slot status) Equal to Is playing
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Level of hero[(Integer A)]) Equal to 3
                      • (Level of hero[(Integer A)]) Equal to 5
                      • (Level of hero[(Integer A)]) Equal to 7
                      • (Level of hero[(Integer A)]) Equal to 9
                      • (Level of hero[(Integer A)]) Equal to 12
                      • (Level of hero[(Integer A)]) Equal to 15
                      • (Level of hero[(Integer A)]) Equal to 18
                      • (Level of hero[(Integer A)]) Equal to 20
                      • (Level of hero[(Integer A)]) Equal to 23
                      • (Level of hero[(Integer A)]) Equal to 26
                      • (Level of hero[(Integer A)]) Equal to 28
                      • (Level of hero[(Integer A)]) Equal to 40
                      • (Level of hero[(Integer A)]) Equal to 43
                      • (Level of hero[(Integer A)]) Equal to 46
                      • (Level of hero[(Integer A)]) Equal to 49
                      • (Level of hero[(Integer A)]) Equal to 53
                      • (Level of hero[(Integer A)]) Equal to 55
                      • (Level of hero[(Integer A)]) Equal to 58
                      • (Level of hero[(Integer A)]) Equal to 60
                      • (Level of hero[(Integer A)]) Equal to 63
                      • (Level of hero[(Integer A)]) Equal to 65
                      • (Level of hero[(Integer A)]) Equal to 67
                      • (Level of hero[(Integer A)]) Equal to 71
                      • (Level of hero[(Integer A)]) Equal to 73
                      • (Level of hero[(Integer A)]) Equal to 74
                      • (Level of hero[(Integer A)]) Equal to 76
                      • (Level of hero[(Integer A)]) Equal to 78
                      • (Level of hero[(Integer A)]) Equal to 80
                      • (Level of hero[(Integer A)]) Equal to 82
                      • (Level of hero[(Integer A)]) Equal to 84
                      • (Level of hero[(Integer A)]) Equal to 85
                      • (Level of hero[(Integer A)]) Equal to 87
                      • (Level of hero[(Integer A)]) Equal to 89
                      • (Level of hero[(Integer A)]) Equal to 91
                      • (Level of hero[(Integer A)]) Equal to 93
                      • (Level of hero[(Integer A)]) Equal to 94
                      • (Level of hero[(Integer A)]) Equal to 95
                      • (Level of hero[(Integer A)]) Equal to 96
                      • (Level of hero[(Integer A)]) Equal to 97
                      • (Level of hero[(Integer A)]) Equal to 98
                      • (Level of hero[(Integer A)]) Equal to 99
                      • (Level of hero[(Integer A)]) Equal to 100
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Level of Attribute Bonus for hero[(Integer A)]) Not equal to Attribute[(Hero level of hero[(Integer A)])]
                    • Then - Actions
                      • Unit - Set level of Attribute Bonus for hero[(Integer A)] to Attribute[(Hero level of hero[(Integer A)])]
                      • Game - Display to (Player group((Owner of (Triggering unit)))) the text: Attribute Bonus Lev...
                    • Else - Actions
                • Else - Actions
            • Else - Actions


And after that i have an trigger where a hero can increase it's level by writing "-level max" or "-level 4".. But ! When I do this and the hero get's the level 86, then it wont work before the unit increases one more level?/:

Is there a smart way to edit my trigger above to.. take care of this little issue?

The attribute integer is settet in the map initializaion like this:
Trigger:
  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Attribute[3] = 2
      • Set Attribute[5] = 3
      • Set Attribute[7] = 4
      • Set Attribute[9] = 5
      • Set Attribute[12] = 6
      • Set Attribute[15] = 7
      • Set Attribute[18] = 8
      • Set Attribute[20] = 9
      • Set Attribute[23] = 10
      • Set Attribute[26] = 11
      • Set Attribute[28] = 12
      • Set Attribute[40] = 13
      • Set Attribute[43] = 14
      • Set Attribute[46] = 15
      • Set Attribute[49] = 16
      • Set Attribute[53] = 17
      • Set Attribute[55] = 18
      • Set Attribute[58] = 19
      • Set Attribute[60] = 20
      • Set Attribute[63] = 21
      • Set Attribute[65] = 22
      • Set Attribute[67] = 23
      • Set Attribute[71] = 24
      • Set Attribute[73] = 25
      • Set Attribute[74] = 26
      • Set Attribute[76] = 27
      • Set Attribute[78] = 28
      • Set Attribute[80] = 29
      • Set Attribute[82] = 30
      • Set Attribute[84] = 31
      • Set Attribute[85] = 32
      • Set Attribute[87] = 33
      • Set Attribute[89] = 34
      • Set Attribute[91] = 35
      • Set Attribute[93] = 36
      • Set Attribute[94] = 37
      • Set Attribute[95] = 38
      • Set Attribute[96] = 39
      • Set Attribute[97] = 40
      • Set Attribute[98] = 41
      • Set Attribute[99] = 42
      • Set Attribute[100] = 43
 

TomTTT

New Member
Reaction score
44
Well it may be it, but notice that in your first trigger you didnt add level 86, but did add level 87 which is above it. And as you said it only works when you level one level up, and making it 87 which is triggered.
 

kla0005

New Member
Reaction score
3
Yeah,

Actually my question was something like: "How can i make the trigger add the attribute increased level, all by the hero's level, so the trigger automatics see, okay this unit is in level 86, so it's attribute level should be: .."
 

inevit4ble

Well-Known Member
Reaction score
38
Trigger:
  • Untitled Trigger 002
    • Events
      • Unit - A unit Gains a level
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of (Triggering unit)) Equal to 86
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Attribute Bonus for (Triggering unit)) Not equal to "Level it should b"
            • Then - Actions
              • Unit - Set level of Attribute Bonus for (Triggering unit) to "Level it should be"
            • Else - Actions
        • Else - Actions


I think thats what you were lookin for?
 

kla0005

New Member
Reaction score
3
I was hoping for a better way to do it, so I shouldn't manually put in 80 levels that dosen't is an attribute upgrade level.
 

inevit4ble

Well-Known Member
Reaction score
38
That was just the idea. You don't really have a pattern that you could loop. Mayb if you break it up into sections I can see smaller patterns.
 

TomTTT

New Member
Reaction score
44
see maybe you can set your pattern to be like (Level of (Triggering unit))\2.25
cause that seems abit like what you did. Then, what you do is just set the attribute to what I wrote above.
Trigger:
  • Unit - Set level of Attribute Bonus for hero[(Integer A)] to (Level of hero[(Integer A)]\2.25)
 

inevit4ble

Well-Known Member
Reaction score
38
That was the closest he could get to projecting your pattern.
i.e. If Hero, "Warlock", is lvl 100 then level of attr bonus = 100/2.25 = 44. (Yours is 43) etc.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top