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

Help with simple healing spells based on stats

Status
Not open for further replies.
Level 4
Joined
Feb 13, 2015
Messages
60
Hi, if someone would not mind helping me to trigger Holy Light so it heals more based on the caster intelligence.

Also if not to much im gonna need more, just healing spells but diffirent. Maybe something like a aoe heal around the caster and a circle aoe (like blizzard), frost nova heals one more peolpe around less. Channel heal (lifedrain).

Thanks on before hand, sry if it to much to ask but either this or one at a time.
 
Level 6
Joined
May 20, 2014
Messages
228
  • Holy Light
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Holy Light
    • Actions
      • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + (1.65 x (Real((Intelligence of (Triggering unit) (Include bonuses))))))
Keep in this mind also that whatever Holy Light heals for in object editor will also add to the trigger mentioned before, so if you had it heal for 200, it would heal for 200 plus the intelligence coefficient.

> Maybe something like a aoe heal around the caster and a circle aoe (like blizzard), frost nova heals one more peolpe around less. Channel heal (lifedrain).

You could trigger it the exact same way with the first, but you might have to complicate it a bit more, using a region around the caster that picks every allied unit in the area and healing them. You can use the innate ability Channel to also channel healing to an allied unit, and so on.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
You need to trigger the amount of the heal.
Holy Light is instant if I recall correctly so you don't need difficult stuff.

Make a trigger that runs when a unit has started the effect of an ability.
Do an ability comparison and check if (Ability being cast) is equal to (MyCustomHolyLight).
Then calculate the amount that you want to heal (remember that the spell itself can also heal if you still have an amount in the object editor.)
Then set the life of (target unit of ability being cast) to (life of (target unit of ability being cast) + healAmount).


For AoE heals, you pick every units in <real> range of <location> and set the life of picked unit instead.
Be aware that unit groups and locations leak so you might want to take a look at the leak thread.
But first lets see if you can make the first one.
 
Level 4
Joined
Feb 13, 2015
Messages
60
Ehm, how do i get all of this? Unit "- Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + (1.65 x (Real((Intelligence of (Triggering unit) (Include bonuses))))))"?
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
I can't be more specific. It's black on white.
f5e5fb22d7c2cb98ecd6cc47f2ade257.png
 
Level 3
Joined
Sep 7, 2013
Messages
47
Ehm, how do i get all of this? Unit "- Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + (1.65 x (Real((Intelligence of (Triggering unit) (Include bonuses))))))"?

Unit - Set life of (Target unit of ability being cast) to (Select this then select Arithmetic)
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
I recommend you to make a global variable (call it TempReal) and split the action in 2.

1. Calcuate how much health/mana should be regained.
Make a global variable. This can be done by pressing crl+b or by clicking on the yellow 'X' at the top of the trigger editor. Then you click on the button to create a new one (dont know how it looks like) and you name it "TempReal" and as type you select "real".
Then you make an action (Set variable) and you select TempReal in the first field and you put the value in the second.
The value is calculated in multiple values so you want to use "Arithmetic" to combine them.
The one that you want is (1.65 x INT).
For INT, you have to use a convertion called "Convert Integer to Real".
This is because attributes are retrieved as integers rather than reals.
When you have the convertion, you select "Intelligence of Triggering unit (Include bonusses)" and you have your heal calculation.

2. Add that amount to the unit.
Now you make an action "Unit - Set life (to value)" and you set the value to "Arithmetic" current health + TempReal.
Because you have TempReal rather than the whole calculation, you now can moify it easier, it is easier to read and you can copy and paste a lot of stuff.
 
Level 4
Joined
Feb 13, 2015
Messages
60
I only get this far "unit - set life of (triggering unit) to (life of (targe unit of ability being cast))"

Had a pretty long break, hope not to long.
 
Level 11
Joined
Jan 23, 2015
Messages
788
Choose Arithmetic and then on the place of the first 1.00 put life of triggering unit, while on the second one, put another Arithmetic and then set (example) 1.5 then instead of + choose x and on the second one intelligence of trigg unit.
 
Level 17
Joined
Dec 11, 2014
Messages
2,004
Ok, We'll Start with add action, then Unit: Set Life.
I Have set Priorities so we can talk More comfortable.

attachment.php


Then, Change the Triggering Unit to: Target Unit of Ability being Cast.

attachment.php


Then, Change the (Life of Triggering Unit) to Arithmetic.
A Whole new Menu Pops up. I'll Add more Priorities.

attachment.php


Change A. to (Life of (Target Unit of Ability being cast)).


attachment.php


Then, On B., AGAIN Choose Arithmetic.

attachment.php


Change A. with anything you want, In this case I used Alrights' 1.65 and then change B. With X. (Times)

attachment.php


on C., go to Conversion - Convert Integer to Real.

attachment.php


There, Head to: Hero - Hero Attribute.

attachment.php


Change them As you Want. Remember to Include Bonuses and Set the Hero to Target unit of Ability being cast.

attachment.php


The Result will be somewhat like This:

attachment.php


Hope this helps!
It better do, Took me +1 hour....
 

Attachments

  • Capture.PNG
    Capture.PNG
    49.5 KB · Views: 89
  • Capture2.PNG
    Capture2.PNG
    46.7 KB · Views: 85
  • Capture3.PNG
    Capture3.PNG
    59 KB · Views: 95
  • Capture4.PNG
    Capture4.PNG
    55.3 KB · Views: 110
  • Capture5.PNG
    Capture5.PNG
    83.4 KB · Views: 145
  • Capture6.PNG
    Capture6.PNG
    70.2 KB · Views: 100
  • Capture7.PNG
    Capture7.PNG
    88.7 KB · Views: 80
  • Capture8.PNG
    Capture8.PNG
    95.4 KB · Views: 81
  • Capture9.PNG
    Capture9.PNG
    82.7 KB · Views: 113
  • Capture10.PNG
    Capture10.PNG
    58.9 KB · Views: 93

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Yes arithmetic is a pain in WC3 GUI. Especially due to the poor navigation of nested arguments and functions.

Might I recommend writing JASS? That way if you want to add something you simply press the '+' key and do not have all the bad GUI navigation nonsense to deal with.
 
Level 17
Joined
Dec 11, 2014
Messages
2,004
Yes arithmetic is a pain in WC3 GUI. Especially due to the poor navigation of nested arguments and functions.

Might I recommend writing JASS? That way if you want to add something you simply press the '+' key and do not have all the bad GUI navigation nonsense to deal with.

You are right, JASS Is definitely better, as I am currently trying to learn JASS, But JASS Is helpful when you are no longer in medium Class GUI, if you are becoming a PRO, Then that's the time you would like to learn JASS.

You see he is still a N00b (no offense, OK?), he is new to GUI (Again, No Offense) and You ask him to learn JASS? (This time, no offense to you, DSG)

Now to you, Gurgamel, Keep learning GUI For now and if you have any problems, feel free to PM Me.
 
Status
Not open for further replies.
Top