- Reaction score
- 534
Use a conversion.
Conversion - Convert Real to Integer.
Or the invert way, Integer to Real.
Conversion - Convert Real to Integer.
Or the invert way, Integer to Real.
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
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.
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
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>
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>
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
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
not...force based upon its dominating attribute. If the ...
...force based upon its Strength. If the ..
Oops, my mistake... Yeah, I guess it should be dominant... The problem is that I don't have time now and I have to turn off the PC so I'll fix everything tomorrow.