compairing unit properties and custom spells?

mems

Memory Lapse
Reaction score
24
how can i get my units hitpoints volue as a percent or integer or any kind of value to compare with another one.
Lets say this i want my hostile hero cast healing wave when its hitpoints below %50 how can i get it? i could not found a function on editor may be there can be a jass ect or i did not seen it?

also is it possible to issue order a custom(i mean name changed edited new created ect...) spell to a unit? even with custom scripts?
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
It's possible to have conditions like:
(Integer((Life of (Triggering unit)))) Less than or equal to ((Integer((Max life of (Triggering unit)))) / 2)

"Life" is a "Unit - property" and is a real, not an integer.
But, when using integers, there's a function called "Conversion: convert real to integer".



Yes.
Simply order it to use the original ability you based your custom one off,
with "Unit - issue order targeting ...".
The "target" depends on the ability. Some are "unit", some are "ground"...

As an example, if you made a custom ability based on "Inferno", the order would be:
Unit - Order (Triggering unit) to Undead Dreadlord - Inferno (Position of (Triggering unit))
(Or whatever region you need there)
 

Pyromancer

New Member
Reaction score
16
AceHart said:
"Life" is a "Unit - property" and is a real, not an integer.
But, when using integers, there's a function called "Conversion: convert real to interger

can u convert intergers to reals? i dont see why they have real>interger... it gets in the way alot... :mad:
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> can you convert integers to reals?

Yes. (Conversion: Integer to Real)

> I don't see why they have real>integer... it gets in the way a lot...

Sorry?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top