Add stats

nicolas

New Member
Reaction score
2
So here i got another add stats probleme, the unit can learn a talen which will increase his str by 1/2/3/4/5% and his agi by 2/4/6/8/10% so the trigger:

Code:
iron Will E R
    Events
        Unit - A unit owned by Player 1 (Red) Sells a unit
    Conditions
    Actions
        Wait 2.00 seconds
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Sold unit)) Equal to Iron Will
                ironWill[1] Equal to 1
            Then - Actions
                Set ironWillSt[1] = (Strength of Orc Warrior (Red) 0008 <gen> (Exclude bonuses))
                Set ironWillSt[2] = (ironWillSt[1] / 100)
                Hero - Modify Strength of Orc Warrior (Red) 0008 <gen>: Add ironWillSt[2]
                Set ironWillSt[3] = (Agility of Orc Warrior (Red) 0008 <gen> (Exclude bonuses))
                Set ironWillSt[4] = (ironWillSt[3] / 50)
                Hero - Modify Agility of Orc Warrior (Red) 0008 <gen>: Add ironWillSt[4]
            Else - Actions
                Do nothing

The selling unit is the level up so lvl 1,2,3,4,5

The iron will[1] is the lvl check in this trigger i only used 1 lvl just to show it to you guys.

Tho when i train the ability (sell the unit) it wont add the str or the agi to the unit. i think the probleme is the /numbers but i dont know for sure since /100 (for the str) should be 1% and /50 (for the agi) should be 2%
 

nicolas

New Member
Reaction score
2
Oh ye the w8 time in front (2 sec) is there because there is a trigger where the level is set so (iron will [1] ) with the same selling event and the same selling unit so the w8 time is there so there is enough time to set that level to 1
 

Frozenwind

System maker
Reaction score
99
Wait 2.00 seconds
Thats the problem, a GUI trigger "forgets" triggered unit (and stuff) when you put a wait.
So if you're unit doesn't move, it will work, else I highly recommend JASS.

frozenwind.
 

Trollvottel

never aging title
Reaction score
262
it doesnt forget triggering unit use it instead of sold unit, because sold unit could get lost
 

Frozenwind

System maker
Reaction score
99
k:p
Never tried it out with triggering unit, but then he forgets all "non-triggeringunit" vars.

So, idd.

frozenwind.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top