Life Drain, Hardcoded Enemy Only?

WolfieeifloW

WEHZ Helper
Reaction score
372
I'm trying to make a reverse Life Drain, where the caster looses life and transfers it to a target.
This would obviously be useless to use on enemies, so I changed the Targets Allowed to:
Air, Friend, Ground, Invulnerable, Vulnerable
Which is what auras have minus Self.

However, when I try to use it on an allied hero it says "Must Target An Enemy Unit".

My question is, is this enemy only targeting hardcoded into the game?
Is there anyway to remove it?
If not, what can I base the ability off of?
I've heard "channel" being used for like, everything;
However I've never used it / never even looked at it.

Anybody have suggestions?

Thanks in advance TH.net!
 

perkeyone

something clever
Reaction score
71
sounds like you did everything you could to change the target.
seems to be hard code aka fail code
you might just have to give into channel
i suspect you will end up liking channel
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Doesn't abilities based off channel have to be all triggered?
I've actually poked around at channel since posting and there doesn't seem to be any fields that would help with my situation;
Making it seem I would have to trigger everything?
 

perkeyone

something clever
Reaction score
71
yeah thats the main reason people like channel. it can be made to do nothing.
earlier i tried to make a spell based off of wand of illusions and i deleted all the buffs and effects but i couldnt get it to stop making mirror images. so then i used channel and triggers and it worked fine.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
I really didn't want to have to trigger the spell though.
Oh well;
Thanks for the responses.

EDIT: New problem though.
I changed the Casting Range to 1500 on Life Drain, and when I start channeling it, it lasts for one second, the enemy starts to run towards me, then it stops channeling as if it can't keep going at that distance?
 

perkeyone

something clever
Reaction score
71
is that the reverse life drain or the normal life drain?
if it is the reverse maybe it stops because their hp is full
else maybe it has to do with the caster's (...i forget the word... it starts with aqu...) range or something like that which might cause him to stop targeting the other unit
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Acquisition Range.
It was the reverse one too.
Anyways, I guess it doesn't really matter now.

However, I've made the ability based off channel however when the hero learns the skill it doesn't show up on his skills list.
Like, the icon and all that shows in the Hero Abilities tab [after you click on the +] but it doesn't show where his skills should be when you learn them.
 

PrisonLove

Hard Realist
Reaction score
78
EDIT: New problem though.
I changed the Casting Range to 1500 on Life Drain, and when I start channeling it, it lasts for one second, the enemy starts to run towards me, then it stops channeling as if it can't keep going at that distance?

your leash range is most likely too short.

by default life drain has a cast range and a leash range, cast range is shorter than leash range. leash range is how far away the enemy unit can go before the life drain breaks

so...

lets say cast range is 1500 and leash range is 800 ( i think thats what it is by default) then you can cast the ability at 1500 but since it breaks the leash at 800, if you cast from further than 800 the ability doesnt last.

hope that was insightful
 

WolfieeifloW

WEHZ Helper
Reaction score
372
If you told me how to change the leash range, then it would've been helpful :p .

Anyways, I've got the channel working now but;
It doesn't give the casting unit the buff I've specified on the skill?
 
Reaction score
107
There are fields in gameplay constants dealing with life/mana drain, you need to set those to true before you can target allied/friendly units. But doing so will stop you from being able to target enemy units.
 

MasterRofl

New Member
Reaction score
8
Life Drain is a screwy skill. If you have ally settings set to 0 and targets set to enemy only, you won't be able to use it (and vice-versa).
 

Ghostwind

o________o
Reaction score
172
Doesn't abilities based off channel have to be all triggered?
I've actually poked around at channel since posting and there doesn't seem to be any fields that would help with my situation;
Making it seem I would have to trigger everything?

Triggering everything is a really good idea, especially if you are new to the editor. It helps you get familiar with the way the WC3 game engine works. Although you don't have to-- and probably won't-- listen to me, I suggest you start on vJASS right now because it will make things a lot easier once you decide you want to make more complicated spells. Once you get good at it, it's twice as fast, twice as efficient and you can do twice the amount of things with it (thus 8 times better than GUI!). There are a ton of amazing tutorials here and at wc3jass.com, I really think it would be worth it to at least try devoting a few hours to learning vJASS (you don't have to learn normal jass first, look for a tutorial that covers both as one).

If you decide to do this but need help on finding where to start or go next, feel free to ask me, and you can ask me about general jass questions or you can post them here in the jass help forum.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
I am indeed going to learn JASS soon, and hopefully understand it;
Just not at this time [got a lot of stuff going on :( ] .
And I'll be sure to ask you if I need help with certain things when I start learning!
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
For the record:

> It doesn't give the casting unit the buff

You can not make an ability do something it isn't doing already.
With buffs, the ability either gives one, and it will always do so,
or it doesn't and adding one is not going to help.

Channel does not use buffs...


On a related note, Channel is the "last hope" spell.
In general, always try to use the spell that is already doing most of the work, and you trigger the rest.
Channel is pretty much the other way around, it's not doing anything and you trigger it all.
As such, there's almost always a better choice.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Is there a skill you can suggest to base my "Reverse Life Drain" off of?
The caster needs to lose (25 * level of ability) and the target needs to gain the same amount.
Also it needs to be able to only be cast upon allies.
 

NetherHawk

New Member
Reaction score
26
no need jass or complicated triggering for this. just use a dummy skill to get your target. after which use lightning in the trigger editor to create the 'transfer effect'. just attach the lightning to the chest of the caster and target. nxt just run a timer and set their lives to unit current hp + the xfer amount (for the target) and unit current hp - xferr amount ( for the caster). everytime this xfer is done, set a counter to counter + 1 to store how long your drain has been running. you can stop the draining after the counter reaches a certain amount by pausing the timer when counter = x . of course it would be more effective to do this in jass =x

the dummy skill can be any target skill, like firebolt, storm bolt, chain lightning just make the spell do nth, no dmg, no effects.
 

bumbutt

New Member
Reaction score
1
Advanced => Gameplay Constants => Check "Use Custom Gameplay Constants" => Gameplay - Drain Transfers Life => Set this to true

This worked for me, i have the "reverse" drain life on many maps.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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 The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      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