HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Add stats to spells

09-11-2007, 09:20 PM#1
k0n0
Hello, I was wondering if i made a spell like this:Courage-Gives Hitpoints, armor, and some health regen to your target.





Called Courage Using the Inner flame spell giving some armor and health regen.. How could i add Hitpoints to the current health using GUI? and when the spell wears off so does the hitpoints.. Please help
09-11-2007, 09:31 PM#2
botanic
why dont you just base the spell off avatar and save yourself the trouble?
09-11-2007, 09:50 PM#3
k0n0
Ok but how could i make it so you could cast it on others and it doesnt give a timer that blocks your exp bar..
09-11-2007, 10:50 PM#4
botanic
for the armor set his armor to a variable then set the units armor = variable + value, and change it to the vale when the effect wears off. To change the regain I think there is a hit points regeneration value. It would be under real values. Same with the hit points.
09-12-2007, 12:44 AM#5
Pyrogasm
You can't set armor like that. You'll have to use a modified version of the Ring of Protection ability.
09-12-2007, 01:42 AM#6
botanic
i know there is a way to get armor but now that I think about it I believe that you need an armor detection system then you have to reset that armor with the system.
09-12-2007, 03:13 AM#7
Castlemaster
For a person new to WE, I would suggest making your base spell inner fire, which will give the armor and hp regen bonus (you can find the fields in the object editor. The hp regen bonus is just 0 for the normal inner fire). To add the HP bonus, there is an item ability that raises max hp.

The premise is that you add the +hp ability when the spell is cast, then remove it when it wears off. I believe that the hp bonus will not show up in the ability tooltip, but if it does, use the search function to find a tutorial on making Spellbook abilities that don't show up.

The easiest way to detect the onset and ending of the buff is to make a trigger that will add it when the unit casts the ability. After it is added, there is a command called "wait until (condition) checking every (x) seconds". In the same trigger, put that wait command to wait until the "unit has (inner fire buff) equal to false" and them make the next command removing it.

If that does not make sense, feel free to ask questions.
09-12-2007, 07:04 PM#8
k0n0
Courage
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Courage
Actions
Unit - Add Item Life Bonus (least) to (Target unit of ability being cast)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Then - Actions
Wait until ((Ability being cast) Equal to Courage ), checking every 5.00 seconds
Else - Actions


this is what i got so far but im still confused on what to do please help
09-12-2007, 08:43 PM#9
Castlemaster
Quote:
Originally Posted by k0n0
Courage
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Courage
Actions
Unit - Add Item Life Bonus (least) to (Target unit of ability being cast)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Then - Actions
Wait until ((Ability being cast) Equal to Courage ), checking every 5.00 seconds
Else - Actions


this is what i got so far but im still confused on what to do please help

Please use GUI tags next time.
Completely omit the If/Then/Else statement.
Trigger:
Courage
Collapse Events
Unit - A unit Begins casting an ability
Collapse Conditions
(Ability being cast) Equal to Courage
Collapse Actions
Unit - Add Item Life Bonus (least) to (Target unit of ability being cast)
This part is correct. This may be confusing but you have to add this command.

Trigger:
Wait until ((Target Unit of Ability Being Cast) has buff (Courage)) Equal to True ), checking every 1.00 seconds
Wait until ((Target Unit of Ability Being Cast) has buff (Courage) Equal to False ), checking every 1.00 seconds
-----Remove HP Bonus from unit--------

At the beginning of the trigger, store (Target Unit of Ability Being Cast) to a variable and reference that instead of (Target Unit of Ability Being cast). I had 2 "wait until..." commands because if you just put the second one in "Wait Until.... Equal to False", the part after the wait command will run since at that point the unit does not have the buff. Do you follow?
09-12-2007, 09:16 PM#10
k0n0
Im sorry im a total noob.. but i still dont get it.. How did you get this:
Wait until ((Target Unit of Ability Being Cast) has buff (Courage)) Equal to True ), checking every 1.00 seconds


Oh and i dont know how to show triggers in picture form >.< sorry
09-12-2007, 09:50 PM#11
Silvenon
Quote:
Im sorry im a total noob.. but i still dont get it.. How did you get this:
Wait until ((Target Unit of Ability Being Cast) has buff (Courage)) Equal to True ), checking every 1.00 seconds

Wait for condition (I think it's right below Wait)

Quote:
Oh and i dont know how to show triggers in picture form >.< sorry

Example:

Trigger:
Blabla
Events
Conditions
Actions

Right click on "Blabla" and select "copy as text", then paste it here and wrap it with trigger tags (right next to the jass tags in the line where you have bold, italic and underline).