Creating a weapon that drains the user's life

W

Wind Dragon

Guest
I've been trying to create a weapon that drains the users health while held (like the weapon in Battle of the Stars but I can't seem to get it to work. I think I'm going to need a trigger but I can't see what triggers would work for this (I've tried). I've also tried creating an ability but it won't work.

If anyone has any ideas I'd love to hear them.

Oh and by the way: FIRST POST!!

Map-Editing Rocks
 

Mullit

New Member
Reaction score
51
use a periodic event trigger that picks all units that have that item and sets their life to current life -1.
 

NiKaNoRoU_GR

New Member
Reaction score
115
Code:
Events:
Every 1 seconds of game time
Conditions:
X unit variable carries X item variable
Actions:
Set X unit's life to current life -1
 

Slapshot136

Divide et impera
Reaction score
471
there's a easyer way
give it a ability that's based off of unholy aura.
set it's range to 1
hold shift and set the regen to -1 or w/e
make it's movespeed bonus be 0
 

Tharius

Occasionally Around
Reaction score
39
But, if you want it to always drain life regardless of the unit's life regeneration, that would have to be done through triggers, since Unholy Aura only adds or subtracts a static amount. The hardest part of this would be (I'm assuming the item will be used by a hero since it's... an item) to calculate the unit's life regeneration from strength bonuses (adding 0.01 regen per second since that's the base regeneration for heroes), and add whatever item regen bonuses it has. Using that number, you should be able to stop life regeneration and add a small amount of degeneration as well. Otherwise, heroes with high strength, for example, would probably not notice any difference.
 

Slapshot136

Divide et impera
Reaction score
471
you can make unholy aura heal/unheal by %, there's a Data - Percent Bonus - try checking that
 

SFilip

Gone but not forgotten
Reaction score
634
or item life regeneration bonus.
 
L

LedZepplin

Guest
Could you not check if a Hero has the Item then do a trigger where if the Unit's health is greater than 1 subtract hitpoints from the Hero with the Item?
 

dashival

New Member
Reaction score
11
every second,
Pick every unit in Units in Playable Map Area matching Is a Hero and do:
for 1 to 6, if item in slot integer a is <weapon here>, subtract 1 health.
 
W

Wind Dragon

Guest
Not working...

Alright so I tried using the Unholy Aura thing that many of you recommended but I could not enter a negative number.

I tried pressing <Shift> like Slapshot said but it wouldn't let me enter any data at all (nothing was entered).

Unholy Aura is an excellent choice, it looks like it should do exactly what I want but I need to get it to take away a negative amount of health which is giving me trouble.

I need the ability to be non-static (take away a percent of health) so it can overcome players with high strength. I will probably be reducing the regen constant slightly but not enough to negate that problem entirely.

Anyone know how to make Unholy Aura take away a negative % of health??
 
W

Wind Dragon

Guest
Sweet

Thanks so much! That solved my problem! On with the show!
 

Luth

Lex Luthor!
Reaction score
41
Gosh, you think he would ask the author of the map he referenced. ;)

Auras work if you want to do a constant % gain/loss, but the one in BotS is % loss over time, which used the trigger method listed above, but with % of max life instead of -1.
 
W

Wind Dragon

Guest
Hmmm... New problem

Well it looks like the Unholy Aura isn't working for me. I have it set to take away 1.5% health every few seconds but as soon as the hero picks it up he/she dies instantly.

I re-checked everything and can't find the problem.

I want to try the trigger thing but I can't find the correct comparison for conditions. Am I missing an addon to the editor or something??

The closest I've found to that condition is the following:

((Picked unit) has an item of type Bloodbane) Equal to True

But I don't know what I should use instead of (Picked unit) or if that is alright as it is. There isn't anything that I can use for just any unit.

P.S. Luth I didn't know you were a member of this forum, and even had I known I probably would have assumed that you would be to busy to talk to me.

P.P.S. BoTS = AWESOME, Too every map out there isn't as well put together as that one.
 

BlargIAmDead

New Member
Reaction score
25
Wind Dragon said:
Well it looks like the Unholy Aura isn't working for me. I have it set to take away 1.5% health every few seconds but as soon as the hero picks it up he/she dies instantly.

A trigger might work better. I'm wondering if you typed "-1.5" into the editor; that would subtract 150% of the unit's life (to subtract 1.5%, you'd have to type "-0.015").
 
W

Wind Dragon

Guest
Aaah

Yes that is what I did, that's stupid of the editor. If they write (%) beside the label then the values should be from 1-100.

I'll try that and see how it works.

I still would like to use a trigger instead, seeing as a few other people have had problems using abilities to drain self's life. (Looking through some past posts).

If anyone can tell me explicitly how to access the conditions and effects in the trigger from the third post in this thread, that would be awesome.

Thanks all!
 
G

Goauld

Guest
Free-hand (but should work):
Code:
Events
   Every 1.00 seconds of game time
Conditions
   (no conditions)
Actions
   Set Temp_Group (unit group variable) = Units in Entire map matching (Matching unit is a Hero equal to True)
   Pick every unit in Temp_Group and do (actions)
      Loop (actions)
         For each (Integer A) from 1 to 6 do (actions)
            Loop (actions)
               If-then-else (Multiple functions)
                  If (conditions)
                     Item carried by (Picked unit) in slot Integer A equal to <your item>
                  Then (actions)
                     Set life of (Picked unit) to Life of (Picked unit) - (0.01 * Max life of (Picked unit))
                  Else (actions)
                     Do nothing
   custom script: call DestroyGroup (udg_Temp_Group)
This should decrease 1% health per second, although in my opinion that's too much, you can change the rate by changing how often this is run. Also, if a hero has two of the item, he will take twice the damage.

And triggering it allows better control over the regeneration rate because minimum value in object editor is 0.01 and that's 1% per second. Actually, trigger editor is the same but you can change the time interval. If you change the interval to 2 seconds and the multiplier to 0.03 it'll be 1.5% per second. But again I must say it's too much. The hero couldn't hold the item for even one minute.
 

•Pooter•

Guest
Well it looks like the Unholy Aura isn't working for me. I have it set to take away 1.5% health every few seconds but as soon as the hero picks it up he/she dies instantly.

Did you set the value to 1.50 ?? that would mean he would get negative 150% hp regen per second dude
 
G

Goauld

Guest
•Pooter• said:
Did you set the value to 1.50 ?? that would mean he would get negative 150% hp regen per second dude
Did you read previous posts? You just said something that was already said. What was the point of your post?
 
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