Learning Reincarnation also adds life?

Nivius

TH.net Regular
So, i'm adding a skill to a hero that gives Reincarnation (3 levels)
but i also want this skill to increase life by 1000 each level

but ofc, the added life should not stay if u was to unlearn the skill...

i'm quite new to this, but i think i got the idea right... i just want u guys to see if there's something wrong, also is there a better way of doing this?

Trigger:
  • Reincarnation Life Event
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Reincarnation (lvl3)
    • Actions
      • Trigger - Add to Reincarnation Life <gen> the event (Unit - (Triggering unit) Learns a skill)

Trigger:
  • Reincarnation Life
    • Events
    • Conditions
      • (Learned Hero Skill) Equal to Reincarnation (lvl3)
    • Actions
      • Set Reincarnationlvl[1] = (Level of Reincarnation (lvl3) for (Triggering unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Reincarnationlvl[1] Equal to 1
        • Then - Actions
          • Set Reincarnationlvl[2] = (Level of Reincarnation (lvl3) for (Triggering unit))
          • Unit - Set life of (Triggering unit) to ((Max life of (Triggering unit)) + 1000.00)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Reincarnationlvl[1] Equal to 2
            • Then - Actions
              • Set Reincarnationlvl[2] = (Level of Reincarnation (lvl3) for (Triggering unit))
              • Unit - Set life of (Triggering unit) to ((Max life of (Triggering unit)) - 1000.00)
              • Unit - Set life of (Triggering unit) to ((Max life of (Triggering unit)) + 2000.00)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Reincarnationlvl[1] Equal to 3
                • Then - Actions
                  • Set Reincarnationlvl[2] = (Level of Reincarnation (lvl3) for (Triggering unit))
                  • Unit - Set life of (Triggering unit) to ((Max life of (Triggering unit)) - 2000.00)
                  • Unit - Set life of (Triggering unit) to ((Max life of (Triggering unit)) + 3000.00)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Reincarnationlvl[1] Less than 1) or (Reincarnationlvl[1] Greater than 3)
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Reincarnationlvl[2] Equal to 1
                        • Then - Actions
                          • Unit - Set life of (Triggering unit) to ((Max life of (Triggering unit)) - 1000.00)
                          • Set Reincarnationlvl[1] = 0
                          • Set Reincarnationlvl[2] = 0
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • Reincarnationlvl[2] Equal to 2
                            • Then - Actions
                              • Unit - Set life of (Triggering unit) to ((Max life of (Triggering unit)) - 2000.00)
                              • Set Reincarnationlvl[1] = 0
                              • Set Reincarnationlvl[2] = 0
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • Reincarnationlvl[2] Equal to 3
                                • Then - Actions
                                  • Unit - Set life of (Triggering unit) to ((Max life of (Triggering unit)) - 3000.00)
                                  • Set Reincarnationlvl[1] = 0
                                  • Set Reincarnationlvl[2] = 0
                                • Else - Actions
                    • Else - Actions
                      • Do nothing


The part that aren't shown complete in the above script...
Trigger:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Reincarnationlvl[1] Less than 1) or (Reincarnationlvl[1] Greater than 3)
    • Then - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Reincarnationlvl[2] Equal to 1
        • Then - Actions
          • Unit - Set life of (Triggering unit) to ((Max life of (Triggering unit)) - 1000.00)
          • Set Reincarnationlvl[1] = 0
          • Set Reincarnationlvl[2] = 0
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Reincarnationlvl[2] Equal to 2
            • Then - Actions
              • Unit - Set life of (Triggering unit) to ((Max life of (Triggering unit)) - 2000.00)
              • Set Reincarnationlvl[1] = 0
              • Set Reincarnationlvl[2] = 0
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Reincarnationlvl[2] Equal to 3
                • Then - Actions
                  • Unit - Set life of (Triggering unit) to ((Max life of (Triggering unit)) - 3000.00)
                  • Set Reincarnationlvl[1] = 0
                  • Set Reincarnationlvl[2] = 0
                • Else - Actions
    • Else - Actions
      • Do nothing
 

Bloodcount

Starcraft II Moderator
WTF? Won't this work ?!

Trigger:
  • Reincarnation Life Event
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Reincarnation (lvl3)
    • Actions
      • Unit - Add life to trigggering unit


Note: life is a custom ability with 3 levels based on item hit points bonus. It is invisible so no one will notice.
 

Nivius

TH.net Regular
WTF? Won't this work ?!

Trigger:
  • Reincarnation Life Event
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Reincarnation (lvl3)
    • Actions
      • Unit - Add life to trigggering unit


Note: life is a custom ability with 3 levels based on item hit points bonus. It is invisible so no one will notice.
noticed this :p bit after some thinking i changed it to +40 str (1000 life and some regen)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

    Members online

    Affiliates

    Hive Workshop NUON Dome World Editor Tutorials

    Network Sponsors

    Apex Steel Pipe - Buys and sells Steel Pipe.
    Top