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.

      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