HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Weird Healing Ability

12-04-2006, 04:21 AM#1
ShadowDestroyer
I have a feeling this will be very difficult to accomplish, however, I would greatly appreciate your help. I would like to make an ability that basically works like a healing salve, dispelling upon hit, but heal as a percentage rather than a set value.

Even more difficult, I would also be happy with an aura that heals like a fountain of life, but is dispelled for 5 seconds if you are attacked, causing the fountain only to heal you while out of combat. I do not need both, but if you know how to do either, please let me know.
12-04-2006, 06:12 AM#2
Captain Griffen
Do you mean on hit, or on damage?
12-04-2006, 10:28 AM#3
SlickR
Quote:
Originally Posted by Captain Griffen
Do you mean on hit, or on damage?
i believe he means on damage, basicly to be damaged you need to take a hit!
anyways it can be done, find healing slave in abilities and just edit it to fit your likings!
and for the dispell on hit use trigers or JASS
trigers should look something like this:
condition:
every 1 second of game time
event:
a unit takes damage (or is damaged)
hero/unit dealing damage equal to player("opposing player hero or unit")
actions:
stop the effect of a (your spell)

well the trigers should look something like this and sorry that they are not direct ones but i'm too lazy to make them with the WE.
12-04-2006, 03:50 PM#4
Captain Griffen
Quote:
Originally Posted by SlickR
i believe he means on damage, basicly to be damaged you need to take a hit!

Hit is generally used to refer to an attack hitting the target.

Damage can be done in other ways (ie: abilities).
12-04-2006, 05:25 PM#5
Valdez
Alright, for your first ability, the Healing Salve one, just create a new ability based off of the Healing Salve ability, now in that ability there should be a line like this "Stats - Item Ability True" just change that to false and if u want it to be a hero ability, just above that one should be a line like so "Stats - Hero Ability False" likewise just change it to true. Now, enter Buffs/Effects and create a new buff based off of "Rejuvination (Item)" be shure to leave everything the same except the icon if u want it to look like the ability's icon and u need to change the name, now there are to name fields One is for WE use only and the other is the name displayed in-game. Change them both, but the one we are really worried about is the WE Only, name. Now we need a variable made, a unit variable called "RejuvTarget." For this example my buff name is "Healing Salve;" Spell name is "Rejuv Me." Now this will take 2 triggers, 1 for setting evrything up and the 2nd for the actual healing, I will call them "RejuvMeSpell" for setup and "RejuvMeTics" for actual healing

Trigger:
RejuvMeSpell
Collapse Events
Unit - A unit Begins casting an ability
Collapse Conditions
(Ability being cast) Equal to Rejuv Me
Collapse Actions
Set RejuvTarget = (Target unit of ability being cast)
Trigger - Turn on RejuvMeTics <gen>
Wait 15.00 seconds (however long spells effect lasts)
Trigger - Turn off RejuvMeTics <gen>

For this next trigger, make shure it is not initially on, otherwise it will run uselessly and slow down the game unnessicarialy, that and u may get an error.
Trigger:
RejuvMeTics
Collapse Events
Time - Every 1.00 seconds of game time
Conditions
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Triggering unit) has buff Healing Salve) Equal to True
Collapse Then - Actions
Unit - Set life of RejuvTarget to ((Life of RejuvTarget) x 1.10)%
Collapse Else - Actions
Do nothing

Now, for this last trigger the life gained is by percent. For it to actually work though that percentage must be the % u want to heal + 100% otherwise it will lower the units life, the 100% represents the units current life. Example: You want to add 30% life, to do that the x % would be 130% that way it keeps the current life and adds another 30% to it. If u want to increase life by 100% it would be 200% for this trigger.

I hope you understood all that, sorry if anything is unclear, I did all this off a whim, now if there are multiple levels for this ability it makes things a little more complicated but if u can't figure it out u can just ask and I can show u. Sorry if thats alot to read too, just wanted you to understand every detail.



Now for your second spell, This one was much easier as it is only a disable trigger. muhahahaha. It requires only a Player Group variable called "HealAuraGroup"
Trigger:
Disable Aura
Collapse Events
Unit - A unit Is attacked
Collapse Conditions
(Learned Hero Skill) Equal to Brilliance Aura
Collapse Actions
Player Group - Add (Owner of (Attacked unit)) to HealAuraGroup
Player Group - Pick every player in HealAuraGroup and do (Player - Disable Brilliance Aura for (Picked player))
Wait 5.00 seconds
Player Group - Pick every player in HealAuraGroup and do (Player - Enable Brilliance Aura for (Picked player))
Wait 0.01 seconds
Player Group - Remove (Owner of (Attacked unit)) from HealAuraGroup

That should do it for ya I hope, gl. PS some rep would be nice :)

Later,
~Valdez
12-04-2006, 09:47 PM#6
ShadowDestroyer
+Rep, thanks for the help Valdez.

However, the second ability was misunderstood. The whole aura is not disabled if the hero is attacked, the aura's effect is only removed from the attacked (damaged) unit. It's a very complicated spell.

Also, I didn't make this clear, but the first ability is still an item, simply a percentage based healing salve. That means, I would need it to be able to work on multiple units at once if another player decides to use one (and players can have multiple heroes :-O).

Don't spend too much time, like I said, I only NEED one or the other. Even though, I would probably perfer the aura, but it sounds the most difficult.
12-05-2006, 04:19 PM#7
Valdez
Alright, well this one should work for you then for the Healing Salve:
What you need:
Unit Group Variable called 'RejuvGroup'
Buff based off of Rejuvination (Item) called 'HealingSalve'
2 Triggers, wich are as follows,
Trigger:
Healing Salve Spell
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Healing Salve
Collapse Actions
Unit Group - To RejuvGroup add units near (Position of (Casting unit)) in a range of 250.00 matching (((Matching unit) has buff HealingSalve) Equal to True)
Trigger - Turn on Healing Salve Rejuvinate <gen>
Wait 15.00 seconds
Unit Group - Remove all units from RejuvGroup
Trigger - Turn off Healing Salve Rejuvinate <gen>

This Trigger needs to be 'Initially Off'
Trigger:
Healing Salve Rejuvinate
Collapse Events
Time - Every 1.00 seconds of game time
Conditions
Collapse Actions
Collapse Unit Group - Pick every unit in RejuvGroup and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Picked unit) has buff HealingSalve) Equal to True
Collapse Then - Actions
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) x 1.10)%
Collapse Else - Actions
Do nothing

I think that one should do it for you, I hope at least it will.
Now as for your second one, If I understand what your saying I'm not so shure if that one is exactly possible using contemporary triggers. You would probably need to go jass for that one and thats one type of triggering I can't help you with, I can still try a way I just thought of though, but it will take a bit of time.