• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] How to do Healing Over Time?

Status
Not open for further replies.
Level 4
Joined
Nov 17, 2007
Messages
57
hello :) the spell im making atm is like Regrowth from WoW - it heals for an amount & makes a heal over time on the target. I've tried to make the trigger myself which was like this:
  • Restore instant
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Restore
    • Actions
      • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + (((Real((Intelligence of (Triggering unit) (Include bonuses)))) x 2.00) + ((Real((Level of Restore for (Triggering unit)))) x 10.00)))
and then i made like wait 5 sec, heal for 2.5 etc... which didnt work cus of the wait thing (which i learned from searching HoT, DoT, damage over time, healing over time etc).

Then i got help from another user, and he suggested this:
  • Restore Instant
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Restore
    • Actions
      • Set Target = (Targeted unit)
      • Set Caster = (Casting unit)
      • Unit - Set life of Target to ((Life of Target) + (((Real((Intelligence of Caster (Include bonuses)))) x 2.00) + ((Real((Level of Restore for Caster))) x 10.00)))
      • Wait 5.00 seconds
      • Trigger - Run Restore HoT <gen> (ignoring conditions)
  • Restore HoT
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Restore
    • Actions
      • Unit - Set life of Target to ((Life of Target) + (((Real((Intelligence of Caster (Include bonuses)))) x 2.50) + ((Real((Level of Restore for Caster))) x 5.00)))
      • Wait 5.00 seconds
      • Unit - Set life of Target to ((Life of Target) + (((Real((Intelligence of Caster (Include bonuses)))) x 2.50) + ((Real((Level of Restore for Caster))) x 5.00)))
      • Wait 5.00 seconds
      • Unit - Set life of Target to ((Life of Target) + (((Real((Intelligence of Caster (Include bonuses)))) x 2.50) + ((Real((Level of Restore for Caster))) x 5.00)))
In the first one (which i made) the instant heal worked, but there was no HoT... on the one that was suggested nothing worked - i've asked in another thread how to do a DoT (long time ago) and that was in jass, which i tried to make to a heal over time which i failed badly at as i dont know jass :)

if you know how to make this in the world editor it would be great, but jass is fine too if you explain most of the text :) and sorry for the block of text.. :(
 
Level 10
Joined
Aug 15, 2008
Messages
720
Firstly it leaks...

And to only get it to work

Make HoT event to be Every 5 seconds...

remove wait time from HoT and leave only one that type action

Back to Restore instant

remove wait time, and keep that Turn HoT
Since you want 3 heal times per 5 secs, make wait time after "Trigger - Turn on HoT" what is 15 seconds
and make after that trigger - turn off HoT

For leaks I will tell solution Tommorow, I am bit tired today...

Well if you would know dummy things, you could have made Holy Bolt and when it is casted, create dummy with rejuvienation and order it cast rejubienation on Target unit of ability being cast, then you could make it MUI and very efficient...
 
Level 16
Joined
Jul 21, 2008
Messages
1,121
Base your ability on ''Roar''.

With roar, you can increase life/mana regeneration to units in area over time.
To add even more bonus, press shift + enter before modifying.

EDIT: Image
57388d1244745752-how-to-do-healing-over-time-zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz.jpg
 

Attachments

  • ŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽž.JPG
    ŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽž.JPG
    3.1 KB · Views: 536
Level 4
Joined
Nov 17, 2007
Messages
57
could you please type the whole trigger? i pref a done trigger cus ive been spending like 5 hours on this stupid thing:(

edit: yes i could base it on things like roar etc. but the heal over time is based on the hero's intelligence, which wouldnt be possible with regeneration?
 
Level 3
Joined
Jan 3, 2008
Messages
52
Dude i think there is an ability called regrowth that is the same All you have to do is to modify it the way you want want and Voila!
 
Level 4
Joined
Dec 15, 2007
Messages
96
Remove the event and condition in the "Restore HoT" trigger. Both the triggers will trigger the same time cause of the same event and condition, so you can also safely remove condition. That should be a slightly progress;p
 
Level 10
Joined
Sep 6, 2008
Messages
423
If you want to have a real simple solution, base it of rejuv and a trigger that adds a bit of hp to the target when the ability is cast. If you want it more advanced MUI and GUI (even if with Jass it would be so much shorter) I can make you one that really is a HoT (does not increase regen rate but ticks)
 
Level 9
Joined
Aug 21, 2008
Messages
533
i have a nice solutin if the max int on your map isnt to high:
make a 200 lvl rejuv
use autofilll to set the lvls(^^)
when the unit casts the spell create a unit at the target of the base abilty
then create a dummy there
give him the rejuv
set the lvl to heros int
order the dummy to cast rejuv on the target
add a exxp timer to the dummy
remove leaks
 
Level 3
Joined
Aug 9, 2008
Messages
60
i have a nice solutin if the max int on your map isnt to high:
make a 200 lvl rejuv
use autofilll to set the lvls(^^)
when the unit casts the spell create a unit at the target of the base abilty
then create a dummy there
give him the rejuv
set the lvl to heros int
order the dummy to cast rejuv on the target
add a exxp timer to the dummy
remove leaks

Don't think you realize the fact that object editor things increase the load time by a shit load.
 
Level 9
Joined
Aug 21, 2008
Messages
533
Use jass tags:

JASS:
globals
string NoStack="\n\n\n\n " + "|cffffcc00 Unit already have heal buff|r" + "\n\n\n\n\n\n\n\n\n\n\n\n"
endglobals
//Ranger21
function BoosterHeal takes nothing returns nothing
local timer t=GetExpiredTimer()
local unit u = GetUnitTimer(t, 1)
local integer healed=R2I(GetRealTimer(t,1))
local string s = "|cff00AB00"+I2S(healed)+"|r"
if GetUnitAbilityLevel(u, 'B004') > 0 then
call SetUnitState(u, UNIT_STATE_LIFE,GetUnitState(u, UNIT_STATE_LIFE)+healed)
call list.add(u, s)
else
call FreeTimer(t)
endif
set t=null
set u=null
endfunction
//Ranger21
function ConditionsBooster takes nothing returns boolean
local integer p=GetPlayerId(GetOwningPlayer(GetTriggerUnit()))
local unit targ=GetSpellTargetUnit()
local timer t = null
local real lvl=GetUnitAbilityLevel(GetTriggerUnit(),'A00N')
local real healed=GetHeroInt(GetTriggerUnit(),true)*((lvl/10)+1)
if GetUnitAbilityLevel(targ, 'B004') == 0 then
if GetSpellAbilityId() == 'A00N' and udg_Marine[GetPlayerId(GetTriggerPlayer())]==GetTriggerUnit() then
set t=CreateTimer()
call StoreUnitTimer(targ,t,1)
call StoreRealTimer(healed, t, 1)
call TimerStart(t,1,true, function BoosterHeal)
endif
else
call DisplayTimedTextToPlayer(GetTriggerPlayer(), 0, 0, 5,NoStack)
endif
set targ=null
set t=null
return false
endfunction
//Ranger21

//===========================================================================
function InitTrig_HealBooster takes nothing returns nothing
set gg_trg_HealBooster = CreateTrigger()
call TriggerRegisterPlayerUnitEvent(gg_trg_HealBooster, Player(0), EVENT_PLAYER_UNIT_SPELL_CAST, null)
call TriggerRegisterPlayerUnitEvent(gg_trg_HealBooster, Player(1), EVENT_PLAYER_UNIT_SPELL_CAST, null)
call TriggerRegisterPlayerUnitEvent(gg_trg_HealBooster, Player(2), EVENT_PLAYER_UNIT_SPELL_CAST, null)
call TriggerRegisterPlayerUnitEvent(gg_trg_HealBooster, Player(3), EVENT_PLAYER_UNIT_SPELL_CAST, null)
call TriggerRegisterPlayerUnitEvent(gg_trg_HealBooster, Player(4), EVENT_PLAYER_UNIT_SPELL_CAST, null)
call TriggerRegisterPlayerUnitEvent(gg_trg_HealBooster, Player(5), EVENT_PLAYER_UNIT_SPELL_CAST, null)
call TriggerAddCondition(gg_trg_HealBooster, Condition(function ConditionsBooster))
endfunction
//Ranger21
 
Level 7
Joined
Dec 19, 2008
Messages
276
it is just example, if author know jass(vJass)

i can make this heal without using other systems and by using structs(vJass)

If you want heal with normal jass it very hard for me...

If you want heal system on vJass and which can be executed in GUI, then stop using GUI
 
Status
Not open for further replies.
Top