• 🏆 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!

[Spell] Increase heal effectiveness

Status
Not open for further replies.
Level 6
Joined
Jan 2, 2015
Messages
171
Hi, i am making spell, when my hero activate this spell..he will get 20% heal effectiveness from any healing spells and potion. Can someone tell me how to do this? any help will be appreciate. thank you
 
Level 25
Joined
Sep 26, 2009
Messages
2,378
Well, the most effective way would be to trigger all healing spells. With that you could also add to them a check for (de)buffs to increase/decrease healing amount.

Else you will probably have to make a trigger which fires when any healing spell has been cast, detect which of the healing spells it is from the given list. Then determine how much you heal additionally the targeted unit.
The problem here is obviously with healing-over-time spells or non-targeted spells like Tranquility. This is where the system would get complicated, as you would need periodic events to decrease/increase health of affected units in same time as when they are healed.


Triggering your own healing spells is imo not really a problem and could save you a lot of nerves. There are about 5 types of healing spells that I can remember from the top of my head:
- instant (holy light),
- chaining (Chain heal),
- periodic (healing salve),
- AoE heals without any target (Tranquility),
- targeted AoE heals (Healing spray) - they work same as Tranquility tho
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
If you havent got it, then go download.

I use a very simple and dynamic system in all my maps for healing.
Im also trying to make one for damage but I always go a bit too far in that one.

But anyway, it requires JNGP as it uses vJASS in it.
 
Level 6
Joined
Jan 2, 2015
Messages
171
If you havent got it, then go download.

I use a very simple and dynamic system in all my maps for healing.
Im also trying to make one for damage but I always go a bit too far in that one.

But anyway, it requires JNGP as it uses vJASS in it.

but i dont know how to use JASS. i only good at trigger..i only want this hero to receive 20% more from heal when he activate this spell only for 8 sec. is there any other way to make it work with trigger? i am so confuse
 
Level 12
Joined
May 22, 2015
Messages
1,051
I don't think there's any nice way to do this. You will have to trigger everything at some point. JASS would make this a lot cleaner since you can use global functions. If you make your own custom heal function, you could add checks in there to see if healing should be modified. Then you use that function everywhere you want a unit to be healed and you don't have to worry about everything exploding when you add a new effect that modifies healing.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
I never said that YOU had to use JASS :D
Why so unconfident?

Try this thing:
  • Heal modification
    • Events
      • Game - UHS_Event_OnHeal_Before becomes Equal to 0.00
    • Conditions
      • UHS_Param_Ability[UHS_Index] Equal to Holy Light
    • Actions
      • Set UHS_Param_Modifier[UHS_Index] = (UHS_Param_Modifier[UHS_Index] x 1.20)
That is the thing that increases healing by 20% if the ability was Holy Light.
You ussually should use the type but as you cannot select type in GUI via an ability, this one could work as well.

To apply a heal you do this:
  • Actions
    • -------- triggering unit heals targeted unit of ability being cast for 100 health --------
    • -------- - --------
    • -------- - --------
    • -------- - --------
    • -------- create a new heal (always the same so just copy and paste) --------
    • Custom script: call UHS_CreateNewIndex()
    • -------- - --------
    • -------- set the parameters of the heal --------
    • Set UHS_Param_Amount[UHS_NewIndex] = 100.00
    • Set UHS_Param_Source[UHS_NewIndex] = (Triggering unit)
    • Set UHS_Param_Target[UHS_NewIndex] = (Target unit of ability being cast)
    • Set UHS_Param_Ability[UHS_NewIndex] = (Ability being cast)
    • -------- - --------
    • -------- apply the heal (always the same so just copy and paste) --------
    • Custom script: call UHS_InvokeHeal(udg_UHS_NewIndex)
The custom text ones never change and you can simply copy and paste them.
The other things are the ones that you can use on your own without trouble.
Be aware that when creating, you use UHS_NewIndex as index and on the events (except created event) you use UHS_Index.
 

Attachments

  • Unit Healing System 0.1.w3x
    20 KB · Views: 51
Status
Not open for further replies.
Top