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.
  • 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 The Helper:
    I think we need to add something to the bottom of the front page that shows the Headline News forum that has a link to go to the News Forum Index so people can see there is more news. Do you guys see what I am saying, lets say you read all the articles on the front page and you get to the end and it just ends, no kind of link for MOAR!
  • The Helper The Helper:
    Happy Wednesday!
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    Sticking with the desserts for now the latest recipe is Fried Apple Pies - https://www.thehelper.net/threads/recipe-fried-apple-pies.194297/
  • The Helper The Helper:
    Finally finding about some of the bots that are flooding the users online - bytespider apparently is a huge offender here - ignores robots.txt and comes in from a ton of different IPs
  • Monovertex Monovertex:
    @The Helper I'm really not seeing the "Signature" link in the sidebar on that page. Here's a screenshot:
  • The Helper The Helper:
    I have reported it - I was wondering why nobody I have given sigs to over the last few years have used them
  • The Helper The Helper:
    Ghan has said he has fixed this. Monovertex please confirm this fix. This was only a problem with people that had signatures in the upper levels like not the special members but the respected members.
  • The Helper The Helper:
    Here is a better place to manage this stuff https://www.thehelper.net/account/account-details which I think should be way more visible
  • The Helper The Helper:
    I am hoping that online user count drop is finally that TikTok bot banned
  • Ghan Ghan:
    I added the filter last night.
  • The Helper The Helper:
    They are still there

      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