HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

"Unit's life Become's.. " Problem !

11-06-2007, 06:21 PM#1
abriko
Hi all,

I searched about this problem on the forum but didn't found it... i believe it's a really bug of warcraft3 :

My event is

Trigger:
Events
Unit - Eradicator 0091 <gen>'s life becomes Less than or equal to ((Max life of Eradicator 0091 <gen>) - 250.00)

The problem that the Max life will always be the max life of the Hero at level 1 ( 970 hp )


With this, i check the current unit's max life :

Trigger:
Collapse Events
Player - Player 1 (Red) types a chat message containing nano as An exact match
Collapse Actions
Game - Display to (All players) the text: (String((Max life of Eradicator 0091 <gen>)))

It give the right current unit's max life ( 1770 for level 6 )

So how to have the right current unit's max life for my event "unit's life becomes ??? "
The jass will help me ? Because i can't put variable of any kind in this event.
11-06-2007, 06:36 PM#2
Captain Griffen
The event is created at start up using the data of the hero's health - NOT with a pointer to the unit's health.

It's not a bug.
11-06-2007, 07:16 PM#3
Salbrismind
Why not try, another kind of event. Unit-Generic Unit is attacked or w/e it is...
11-06-2007, 07:19 PM#4
abriko
humm...
The event is not the point, the point is "max life". The event work perfectly for level 1 hero. Why "max life" is not the current "max life" ?

And no i can't try a "Unit is attacked" because i need the same with "unit's life becomes greater than..."
If there is no solution, i'll use the periodic timer... i already have one for many thing.
11-06-2007, 07:47 PM#5
Salbrismind
Quote:
Originally Posted by abriko
humm...
The event is not the point, the point is "max life". The event work perfectly for level 1 hero. Why "max life" is not the current "max life" ?

And no i can't try a "Unit is attacked" because i need the same with "unit's life becomes greater than..."
If there is no solution, i'll use the periodic timer... i already have one for many thing.

For some reason events do allow any variables to be used as reference to what the event is. Thus it uses the default level 1 max life of the units at the start of the map and not an updated number of any sort.

You can still fix this, just make the event Unit-Is attacked, then make the condition control when the trigger actually goes off.
11-06-2007, 07:50 PM#6
abriko
"Unit-Is attacked".... i can but it's half of the problem i need the same event with "unit's life becomes GREATER than..."
11-06-2007, 08:43 PM#7
Ammorth
Events (in GUI) are created when the map loads. The values within the events cannot be changed. So, if you use a variable (aka unit health) it will not update the event when the health changes (hero levels up).
11-06-2007, 11:24 PM#8
abriko
Hum ok thx to explain ^^
I used a different method.. easier :p
11-07-2007, 02:48 AM#9
Salbrismind
Quote:
Originally Posted by abriko
Hum ok thx to explain ^^
I used a different method.. easier :p

Oh? With the unit is attacked event?
11-07-2007, 07:37 AM#10
abriko
-.- ................................................

Are you blind ?
11-07-2007, 03:56 PM#11
Mystic Prophet
Um, ya. you should use unit is attacked with the condition checking on the unit life of the hero.

that should work just fine.

as far as life becoming greater than max. how exactly is that supposed to happen? If you're thinking of avatar and the like, that actually changes his max life for that period of time, so you'd have to check for avatar specificly and not max life.
11-07-2007, 07:46 PM#12
Salbrismind
Quote:
Originally Posted by abriko
-.- ................................................

Are you blind ?

So what method did you use?
11-07-2007, 09:51 PM#13
Jazradel
I use a repeating timer that checks health personally.