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.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top