| 09-13-2004, 08:17 AM | #1 |
How could I add add max life or armor to a hero? Attributes work a bit differnt in my map, and the way they are acquired example: If I put a point into Stanima(adds to my max life) I want it to add health to my hero, and if I put a point into defence (armor) I want it to add armor to my hero I get attibutes by both simply placing the stats, and also by conditions met or items. example the more I get hit my defence skills will go up So how would I make it so if my stanima is 30 add however much life? I cant base stanima off str because im already using str for somthing else |
| 09-13-2004, 01:28 PM | #2 |
There are two ways I could think of doing it, your best bet would be through upgrades, and the other way is abilitys (try this as last case senario, will cause more problems than it fixes probially). The only thing that using abilitys has over upgrades is abilitys can be done for individual units, upgrades are applied to all units with the upgrade owned by the player. |
| 09-13-2004, 06:22 PM | #3 |
Search for "Bonusmod" in the Repository or download WEU Here |
| 09-13-2004, 08:21 PM | #4 |
If he is a hero and has an inventory just give him a manual of health. If he isn't than things get complicated. You probably want an invisibile unit with the locust ability to cast a spell with the manual of health ability on your hero. This works for armor, attributes etc. You just might need to make a custom item for armor. |
| 09-13-2004, 10:43 PM | #5 |
He is hero, but how would I go back stats? So if I remove an item that adds +stanima or so, how would I go about that? Also I want it a real variable like I could have 12.3 stanima, then when I hit 13 it adds that extra health |
| 09-14-2004, 01:01 AM | #6 |
For Health, this is easy. The function is Unit - Set Life (To Value). Just do arithmetic for adding and lowering the HP, for example: Code:
Unit - Set life of (Hero manipulating item) to ((Life of (Hero manipulating item)) + 1.00) Unit - Set life of (Hero manipulating item) to ((Life of (Hero manipulating item)) - 1.00) As for armor, either get WEU and do it the same way, but with armor, or just make two upgrades with thousands of levels(they are researched the level of the previous research + 1 each time an item is dropped or acquired). And it would work. Or for armor, you can find the JASS/Custom Script code for adding and subtracting armor(if its in WEU, its possible to do in regular WE, just not in GUI form) and use custom script lines to do that. I myself and not too sure of the coding for the armor, but I'm going to need it sometime. You don't really need variables, but I'm sure you can find out how to track everything mentioned with integer/real variables(its not that hard). |
| 09-14-2004, 01:14 AM | #7 |
ok I got the mian part of adding life/armor its cake with that editor, however what is the exact trigger of when to add it? ok lets say my stanima is 15 and each stanima point is 1life so I have 15life now I add some item to me that adds 3stanima, or some other random things I dont need to do a trigger for EVERY SINGLE EVENT do I? as in do I need a trigger that adds life because of item adding stanima, than seperate trigger thats adds life because of skill points that add stanima? or is there a way to make it 1trigger as in life =life +stanima? |
| 09-14-2004, 10:49 AM | #8 | |
Quote:
|
| 09-14-2004, 08:15 PM | #9 |
Yea, that only changes the current health. If i'm not missing something, what was wrong with just the normal items like a periapt of health, or a crown of kings, or gauntlets of strength? What you have to do is go to File | Preferences, and check Allow Real Values in Object Editor Then make a version of Manual of Health with a Positive and a negative health gain. Same goes for attributes, health etc. |
| 09-15-2004, 12:22 AM | #10 |
I got that part now, its when to add it now that I need help.. What would be the trigger of checking my stanima/defense stat? |
| 09-15-2004, 02:01 AM | #11 | |
Quote:
In my map, it changes the max health. :\ |
| 09-15-2004, 09:34 PM | #12 |
Well, you have to look at your trigger for making your stamina go up. At the end of that trigger, add these actions. Code:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
stamina Equal to 30
Then - Actions
Hero - Create Manual of Health and give it to Hero
Else - Actions |
| 09-15-2004, 11:47 PM | #13 |
So I have to make a trigger for every possible #? like if stanima = to 30 stanima = to 31 stanima =32? thats how it sounds and theres noway I wanna do that ok everytime I get hit my agility goes up .1, how would I add that to my agility, you cant have .1 in your agility, so I would need it to read the agility variable every time I get a whole #. So I need it to read my agility variable every time it raches a whole # and add that extra point to my agility heres the kinda trigger I want E: unit takes damage C: is a hero A: set variable agility = agility +.01 E: agility variable be comes a whole # A: add 1 agility to hero but there is no becomes a whole #, so thats the part I need help on |
| 09-16-2004, 12:28 AM | #14 |
k nvm I found a different way to work around it, by doing it from the opposite end. |
| 09-16-2004, 06:42 AM | #15 | |
Quote:
That's not possible. Not with the trigger listed, that adds one hp (If possible) or subtracts one. |
