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

mp/hp bonuses

Status
Not open for further replies.
Level 9
Joined
Oct 17, 2007
Messages
547
Im trying to figure out a way to keep track of how much hp, mana bonus a hero has at any given point. Bonuses are from powerup items. Since each player has more than 1 hero upgrades wont be an option because its universal.

What I tried to do is:
-Make a passive HP increase ability base on an item skill.
-Make it has 100 levels, each lv increases HP by 10 (has starting bonus of 0 hp).
-Everytime a powerup item of that type is used on that hero, the ability lv will increase by 1.

Couldn't get the ability to work atm, anyone know y?
 
Level 11
Joined
Aug 25, 2006
Messages
971
Maybe if you showed the map/triggers/item and gave a much better description of what you tried to do, we could help you better.
 
Level 24
Joined
May 20, 2007
Messages
3,283
Indeed it seems that you have a map where your hero has a lot of HP and MP ,right?

Well I must say that there is no way that the game would keep track of such a large amount of HP and MP.

A way that I know,make a leader board were it shows your current Hp/Mp and your starting Hp/Mp,then make a command that shows a report between them.

Example-you currently have 300 HP from 30 starting,type -xxxx or whatever and it will show you that you gained 270.Understand?

I will try to make such a trigger,but it will take some time.
 
Level 11
Joined
Aug 25, 2006
Messages
971
Indeed it seems that you have a map where your hero has a lot of HP and MP ,right?

Well I must say that there is no way that the game would keep track of such a large amount of HP and MP.

A way that I know,make a leader board were it shows your current Hp/Mp and your starting Hp/Mp,then make a command that shows a report between them.

Example-you currently have 300 HP from 30 starting,type -xxxx or whatever and it will show you that you gained 270.Understand?

I will try to make such a trigger,but it will take some time.

Why thats not a great idea:
1. To make that MPI your going to need to use GetLocalPlayer, and you need to be very careful about local strings. (not a good idea) GetLocalPlayer should only be used as an absolute last resort. I wouldn't use it in this case.

2. Its true, at some point the game can't display your hp anymore. But if the ability increments by 10 and goes to 100 its only going to be 1000 which is hardly a problem.

Besides, (I should of mentioned this before) theres a hell of a lot easier way to do this.

Just modify the Item Permanent Life Gain +50 ability to give +10 and use it in a tome. (see map)
 

Attachments

  • HpUp.w3x
    12.3 KB · Views: 53
Level 19
Joined
Aug 24, 2007
Messages
2,888
Making Item Health Bonus abilties have multiple level doesnt work with
Set Unit Ability Level (maybe with other ways too)

I'd use upgrades or hp tomes
 
Level 9
Joined
Oct 17, 2007
Messages
547
Let me clarify my quest again since there are too much confusions:

Im trying to find an easy way of keeping track of how much is the total hp the hero gain from picking up powerup items at any given point.

For example: I have a hero footman, as it kill the creeps it will sometimes get powerup items that increase stats. When it reaches a certain lv, it will morph into a knight.
I want the knight to have all the powerup items that the footman picked up. Each player has different number of heroes and it changes dynamically so variables arent an option. Upgrades work on all units so its not an option for me either.
 
I have an idea:
Create a footman for neutral passive samewere in the map.
And when the footman turns into a knight,dont remove the footman immidietly,instead create a knight next to the footman and the trigger will do this:
  • Actions
    • Unit - set knight hp to (knight hp + (footman hp - (footman hp that neutral passive has)))
this shoud work, i didt test it
 
Status
Not open for further replies.
Top