Spell Inner Vitality

Sim

Forum Administrator
Staff member
Reaction score
534
Use a conversion.

Conversion - Convert Real to Integer.

Or the invert way, Integer to Real.
 

cr4xzZz

Also known as azwraith_ftL.
Reaction score
51
Thanks a lot Daxtreme I finally fixed it. Here is the trigger:

Code:
Inner Vitality
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Inner Vitality 
    Actions
        Set Target = (Target unit of ability being cast)
        Set Strength = (Real((Strength of (Target unit of ability being cast) (Include bonuses))))
        Set Level = (Real((Level of Inner Vitality  for (Casting unit))))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Percentage life of Target) Greater than or equal to 40.00
            Then - Actions
                For each (Integer A) from 1 to 16, do (Actions)
                    Loop - Actions
                        Unit - Set life of Target to ((Life of Target) + ((Strength x (Level x 0.05)) + (Level x 2.00)))
                        Wait 0.80 seconds
            Else - Actions
                For each (Integer A) from 1 to 16, do (Actions)
                    Loop - Actions
                        Unit - Set life of Target to ((Life of Target) + ((Strength x (Level x 0.15)) + (Level x 2.00)))
                        Wait 0.80 seconds
Someone might ask why I used 0.80 seconds instead of 1.00 seconds. The problem is that when I use 1 second the heal continues 2-3 seconds more after the buff ends. With 0.80 seconds it works just fine. The new version can be found in my first post.
 

Jazradel

Helping people do more by doing less.
Reaction score
102
I would recomend still using the timer, just only have one extra trigger instead of 9. Waits are dodgy, particularly in loops.
 

Sim

Forum Administrator
Staff member
Reaction score
534
Indeed, (Integer A) is a global variable, which means that if anyone uses an Integer A loop while your spell takes effect, it will bug.
 

ertaboy356b

Old School Gamer
Reaction score
86
Use Jass Loops..

Custom Script: local integer a = 1
Custom Script: loop
Custom Script: exitwhen a > (The Number You Wish the Loop would end)
<Your Actions>
Custom Script: endloop
 

cr4xzZz

Also known as azwraith_ftL.
Reaction score
51
Use Jass Loops..

Custom Script: local integer a = 1
Custom Script: loop
Custom Script: exitwhen a > (The Number You Wish the Loop would end)
<Your Actions>
Custom Script: endloop

I don't know JASS, so ... I don't have a clue what this means :eek:
 

ertaboy356b

Old School Gamer
Reaction score
86
Code:
Event:
COnditions:
Actions:

    Custom Script: local integer a = (The Starting Number of Your Loop)
    <Add Some of you actions before the loop maybe>
    Custom Script: loop
    Custom Script: exitwhen a > (The Ending Number of your loop)
    <Some of your actions being looped>
    Custom Script: set a = a + 1
    Custom Script: endloop
    <Some of your actions at the end of the loop>

or maybe you can do this at the start of your trigger

Code:
Events:
COnditions:
Actions:
    Custom Script: local integer bj_forLoopAIndex
    Custom Script: local integer bj_forLoopAIndexEnd
    Custom Script: local integer bj_forLoopBIndex
    Custom Script: local integer bj_forLoopBIndexEnd
    <Your Original Triggers>

Just add the few first Custom Scripts at the start of your trigger.. Not sure though if this will trick the trigger..
 

Sim

Forum Administrator
Staff member
Reaction score
534
You can do do what ertaboy said, or use what you did previously (with the timer)

Just don't create 9 triggers. 2 will do it ;)
 

cr4xzZz

Also known as azwraith_ftL.
Reaction score
51
You can do do what ertaboy said, or use what you did previously (with the timer)

Just don't create 9 triggers. 2 will do it ;)

Ok, I'll fix it when I have time.

EDIT: Fixed again... Now it uses 3 triggers... If 3 triggers are too many I'll edit it and try these Jass loops
 

cr4xzZz

Also known as azwraith_ftL.
Reaction score
51
Edited again, maybe for the last time... If you find any bugs please reply. And change the old version in the Dota Spell Index with this new one <3
 

Naminator

Coming Back To Life
Reaction score
76
If you want change that, and upadate the map again, it wouldn't take nothig, it would be great, since is the dominant attribute, not the strengh, people can think that's wrong when, let's said you have your dominant attribute intelligence, just a minor text problem. :p
 

cr4xzZz

Also known as azwraith_ftL.
Reaction score
51
Oops, my mistake... Yeah, I guess it should be dominant... :D The problem is that I don't have time now and I have to turn off the PC so I'll fix everything tomorrow.
 

Naminator

Coming Back To Life
Reaction score
76
Oops, my mistake... Yeah, I guess it should be dominant... :D The problem is that I don't have time now and I have to turn off the PC so I'll fix everything tomorrow.

No problem. Do it when you have the time. ;)
 
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