Modifying Unit properties

misterurafag

New Member
Reaction score
0
I am trying to multiply a units current max health, current armor ext. by a intager varible. so that after he spawns or even possibly before his health armor will change by how much i multiply thier current max is. and i will be doing them individualy example. max health x 2 and current armor by 3.
any suggestions?
and thanks in advance for the help!
 

Furby

Current occupation: News poster
Reaction score
144
Create ability which giving health point for 1 per level of ability and make it for 1000 levels or how much you think can be maximum. And when you want just save to variable a value of current health x your multiplier and set level of ability to unit which is equal to the value of variable. (You dont need variable, you can do it without it) and for armor do same.
 

YourFace

<span style="color:#9C9C9C;"><strong>Runner Up - T
Reaction score
91
easy, but you need to trigger it, ill make the trigger
Code:
Untitled Trigger 001
    Events
        Unit - A unit enters (Playable map area)
    Conditions
        (Unit-type of (Triggering unit)) Equal to YourHero
    Actions
        Unit - Set life of (Triggering unit) to (((Max life of (Triggering unit)) x 2.00) + 0.00)
 

Xorifelse

I'd love to elaborate about discussions...........
Reaction score
87
easy, but you need to trigger it, ill make the trigger
Code:

Good luck, you cant exceed the units MAX health by triggers.
However, playing with ability id's ( using jass newgen ) and simple trigger mathematics you can increase the units max health.

Armor can be increased by the same thing.
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
Create ability which giving health point for 1 per level of ability and make it for 1000 levels or how much you think can be maximum. And when you want just save to variable a value of current health x your multiplier and set level of ability to unit which is equal to the value of variable. (You dont need variable, you can do it without it) and for armor do same.

sounds easy not? but unfortunately it wont work. sorry mate.
life bonus ability cannot be leveld although you can give it different levels it will always take the value of the first level. you cant give many times the same ability as well.
i would suggest using upgrades for this if there aint other units of the same type owned by that player. however you could create many different life bonus abilitys though it will be much work.
 

misterurafag

New Member
Reaction score
0
alright i tried to use the life bonus ability to increase the amount of health.
Code:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        Unit_Health Equal to 3
    Then - Actions
        For each (Integer A) from 1 to Unit_Health_1, do (Actions)
            Loop - Actions
                Unit - Add Item Life Bonus (Greater) to (Triggering unit)
                Unit - Set level of Item Life Bonus (Greater) for (Triggering unit) to 4
                Unit - Remove Item Life Bonus (Greater) from (Triggering unit)
    Else - Actions
        Do nothing
where the level of the ability is my multiplier (starts at 0 then +1 every after) and i just times that by the units health. But the unit just dies instantly any reason why?
 

Verrak

New Member
Reaction score
4
> life bonus ability cannot be leveld

But it can be bugged. Use this. You only need one Life Bonus ability with several levels (less than 10).

So will Knight's animal war training type upgrade bug out with multiple levels?
I currently am planning on using 10 levels, each 100 hit point upgrade? would it bug out?
 

vypur85

Hibernate
Reaction score
803
> Knight's animal war training type upgrade

Hmmm... Not sure what's that. I only know that Item Life Bonus and Item Mana Bonus can be bugged by adding, setting level, and removal. Not sure about other bugs though. They might or might not work. You could just try it out. Just use Tom's template. It's easy to use. Just like a system, a simple one. Set the desired unit and integer (your max life point or max mana point). Then run the trigger. Simple. No need create anything new.
 

Flare

Stops copies me!
Reaction score
662
http://www.thehelper.net/forums/showpost.php?p=773694&postcount=4
Thanks to vypur for posting it

Short, simple, does what it's supposed to do. Or use Blade.dk's (can be found at WC3JASS or WC3C)/Tom Jones' system (which vypur linked to), even though there's probably alot more implementation required for those

As regards armor, you could use Devotion Aura (with 0 radius, and modified stats) or upgrades
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top