HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How to make a unit lose 2hp every second?

09-08-2003, 12:49 AM#1
ismokeweed
i want to know how to make a unit lose hp every second so that its loses hp rather than regains it, ive tried setting the hp regeration to a minus number but it just reurns to a zero anyone got any ideas? its got to work in a way that a unit loses 1 hp every second
09-08-2003, 01:07 AM#2
gurubvin
make a trig that says every x sec. set so and so unit's life to (so and so unit's current life - 2)
09-08-2003, 01:16 AM#3
ismokeweed
that dont work you can make a trigger thats sets life to a percent or a set it to a number you cant just minus -2hp per second it just sets his hp to -2 and kills the unit any other ideas?
its for a unit that has to eat to regain health you see so all game its got to eat to regen health points and be constanly in need of hp
09-08-2003, 01:20 AM#4
Hunter0000
no offence, bur are you new to WE?

make sure the unit is defined by a variable

every 1.00 second

Set (life of(x unit)) to (life of(x unit -2))
09-08-2003, 01:23 AM#5
ismokeweed
yes i am sort of, but thanks for help i'll try it
09-08-2003, 01:32 AM#6
ismokeweed
i dont have any idea how to set a variable to a unit sorry im new to triggers how do i do it?
09-08-2003, 01:46 AM#7
mikedogdude
Use the trigger function "Set Variable"
09-08-2003, 02:50 AM#8
Ultramagnetic
if You're trying to make it some kind of spell effect do it like this:

Mod a version of unholy aura to have no move speed increase, with a -1 regen rate. Then in the unit's stats, set his normal regen rate to 2.00, right underneath set it to Always, and that should do the trick. You may need to monkey with the regen rate on the actual unit. My first guess is 2.00 will work. But it may need to be 0 or even -1.00. I'm not too sure. I'm just thinking if you set the regen rate to 1 hp a second and then add the unholy aura effect which has -100% regen rate, then to me it seems like it would turn that +2 into a -2... then again maybe not. :)

If it's not some spell effect though, then just do it the way Pascal said.
09-08-2003, 05:57 AM#9
Arche
Quote:
Originally posted by Ultramagnetic
if You're trying to make it some kind of spell effect do it like this:

Mod a version of unholy aura to have no move speed increase, with a -1 regen rate. Then in the unit's stats, set his normal regen rate to 2.00, right underneath set it to Always, and that should do the trick. You may need to monkey with the regen rate on the actual unit. My first guess is 2.00 will work. But it may need to be 0 or even -1.00. I'm not too sure. I'm just thinking if you set the regen rate to 1 hp a second and then add the unholy aura effect which has -100% regen rate, then to me it seems like it would turn that +2 into a -2... then again maybe not. :)

If it's not some spell effect though, then just do it the way Pascal said.


It doesn't work that way, me thinks.

You can make a spell out of the foutain of life ability, then make it negative and only affect the unit in question. It will also have no icon at all.
09-08-2003, 07:15 AM#10
Bloodlust
Quote:
Originally posted by Pascal314
Go to file->preferences->general->allow negative real values.

Then change the unit's regeneration to -2.



btw: you know that a hero with enough STR can outregen this?^^
09-08-2003, 09:44 AM#11
ismokeweed
to pascal thanks for taking the time to help thats just the answer i was looking for i knew there would be away to do it without haveing to use a 1000 triggers
09-08-2003, 09:50 AM#12
ismokeweed
that worked perfectly pascal thanks man now i can finish my virtual lion map where you have a pack of lions that lose energy because of hunger and have to eat to stay alive
09-08-2003, 06:19 PM#13
HarlequinKnight
Ahh, Pascal, I was wondering why I got here too late...

The option to allow negative numbers (they even give a warning) can be unstable at times, but usually never with things like life and dmg...


p.s. Why would you want a unit to die anyways? Unless it were summoned....Maybe...But couldn't you just use the pheonix ability?