• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ HD Level Design Contest #1 POLL is now OPEN! Check out the stunning visuals of the final entries. 🔗Click here to cast your vote!

Blood Steal Spell need help

Status
Not open for further replies.
Level 5
Joined
Dec 31, 2013
Messages
121
Hello, I am not good at triggers so sorry if this is really simple. I would like to make spell that will steal blood from enemy units and transfer it to my hero. This spell is similar to Vladimir's from League of Legends Q spell, you can watch it here:
http://youtu.be/EwSpUvyjhPQ?t=51s
(Actually I would like all his spells in war3, but it's too hard for me)

So I've found 2 ways how to do it.

First one: I use ability on enemy unit, this enemy unit will lose some hp and under enemy unit will spawn dummy which will shoot at me spell that will heal me. Dummy unit shoots at me fireball with like -50 damage and I got healed for 50 hp, but it will also stun me. That is the problem, how to remove stun? Even with 0.01 seconds it still stun me and with 0.00 seconds it will stun forever. I can't find same spell without stun option and which will fly to me. Maybe Death Coil but it is only heal undead units, and I don't have idea how to make it heal all units.

(Kinda bad idea) Second Idea is like the same, but Dummy units instead of spell will attack me with 0 damage and when my hero is get damage, trigger will heal me for some hp, but I don't know trigger that will work when hero is damaged. Because when hero "is attacked" he will get heal before projectile will hurt him.

Please help, maybe you know other method? Guess I made it clear.
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
Both are very bad ideas... you start fine, I give you that, but then it becomes too complicated and too inneficient.
It is quite simple. I will edit this post with triggers. His other spells are not that hard either, maybe the E will cause minor headache...



All variables except Temp_Caster are Reals, only Temp_Caster is a unit

  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Transfusion
    • Actions
      • -------- CONFIGURABLES --------
      • -------- Vladimirs Q scales of ability power --------
      • Set Temp_IntScaling = 0.60
      • -------- Every level his Q gains that much damage. --------
      • Set Temp_DamagePerLevel = 35.00
      • -------- This is teh damage on level 1 --------
      • Set Temp_DamageBase = 90.00
      • -------- This is the percentage healing from damage dealt. In this case of my laziness it works more like spellvamp than his actual Q mechanics. --------
      • Set Temp_HealingPercentage = 0.30
      • -------- END CONFIGURABLES --------
      • -------- SPELL --------
      • Set Temp_Caster = (Triggering unit)
      • -------- DAMAGE PART --------
      • Set Temp_IntToDamage = ((Real((Intelligence of Temp_Caster (Include bonuses)))) x Temp_IntScaling)
      • Set Temp_Damage = ((Temp_DamageBase + (Temp_DamagePerLevel x ((Real((Level of Transfusion for Temp_Caster))) - 1.00))) + Temp_IntToDamage)
      • Unit - Cause Temp_Caster to damage (Target unit of ability being cast), dealing Temp_Damage damage of attack type Spells and damage type Normal
      • -------- HEAL PART --------
      • -------- This is not how vladimirs spell heals him but I am too lazy to do another formula so: --------
      • -------- He is healed for some percentage of the damage dealt. --------
      • Set Temp_Healing = (Temp_Damage x Temp_HealingPercentage)
      • Unit - Set life of Temp_Caster to ((Life of Temp_Caster) + Temp_Healing)
 
Last edited:
Level 5
Joined
Dec 31, 2013
Messages
121
WoW, nice, took me like 1 hour to build it, because I was looking for right triggers long time. I understand how trigger works, but I could never do it by myself.
Also it's a bit different that I was looking for, I mean system is great, but how I do visual effect? I have blood projectile model and I need that it fly to my hero and would be perfect if he gets heal when this blood reaches him. Any ideas?
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Hello, I am not good at triggers so sorry if this is really simple. I would like to make spell that will steal blood from enemy units and transfer it to my hero. This spell is similar to Vladimir's from League of Legends Q spell, you can watch it here:
http://youtu.be/EwSpUvyjhPQ?t=51s
(Actually I would like all his spells in war3, but it's too hard for me)

So I've found 2 ways how to do it.

First one: I use ability on enemy unit, this enemy unit will lose some hp and under enemy unit will spawn dummy which will shoot at me spell that will heal me. Dummy unit shoots at me fireball with like -50 damage and I got healed for 50 hp, but it will also stun me. That is the problem, how to remove stun? Even with 0.01 seconds it still stun me and with 0.00 seconds it will stun forever. I can't find same spell without stun option and which will fly to me. Maybe Death Coil but it is only heal undead units, and I don't have idea how to make it heal all units.

(Kinda bad idea) Second Idea is like the same, but Dummy units instead of spell will attack me with 0 damage and when my hero is get damage, trigger will heal me for some hp, but I don't know trigger that will work when hero is damaged. Because when hero "is attacked" he will get heal before projectile will hurt him.

Please help, maybe you know other method? Guess I made it clear.

You seem to be completely new to triggering in WC3 so I will start at the very bottom of triggers.

Sometimes when something happens in the game, an event is fired.
This is simply to let everyone know that something has happened.

Events are like "Map Initialization", "A unit dies", "A unit is attacked", "Elapsed gametime is equal to (real)", "(player) selects a unit", "A unit enters (region)", etc, etc, etc.
With triggers, you can do something when such an event is fired. This is an event action. (aka Trigger action)

In this trigger, the game displays the text "A unit has died." to all players when a unit died.
  • Dying Unit
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Game - Display to (All players) the text: A unit has died.
For your situation, we are going to do something when a unit has used a spell.
There are several events that we can use for that:
"A unit is issued an order" -> when a unit is ordered to cast the spell.
"A unit begins casting an ability" -> when that unit is starting to cast the spell.
"A unit begins channeling an ability" -> when that unit is starting to channel the spell.
"A unit starts the effect of an ability" -> when the spell has started it's effect.
"A unit finishes casting an ability" -> when that unit has finished the casting animation without interrupting.
"A unit stops casting an ability" -> when that unit is interrupted (including when he takes a new order)

For now, all you have to know is "A unit starts the effect of an ability".
When the mountain king for example is casting his storm bolt and the projectile is created, that moment this event is fired.

You want to make a spell effect like Vladimir's Transfusion.
So you want to:
- deal damage to the targeted unit
- heal the caster

Both can be done in triggers very easily.
You create a trigger and give it the event "A unit starts the effect of an ability".
Then you have to check if that ability actually is your transfusion.
So you create a condition (can also be done in an If/Then/Else but that doesn't matter)
The condition will be "(Ability being cast) equal to <MyCreatedTransfusionAbility>".
Then you know when a unit has cast the transfusion spell.
  • Vladimir Transfusion
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Transfusion (Vladimir)
    • Actions
      • Game - Display to (All players) the text: A unit has cast Transfusion.
Now all you have to do is deal the damage and heal the caster.
There is an option to set a unit's health and mana to a percentage or raw value.
What you want to do is to set the health of the caster to the health of the caster added to a custom value.
  • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + TempReal)
(To make that "() + ()" you have to use the function "Arithmetic".)
The Triggering unit is always the unit that triggered the event.
In this case it is "A Triggering unit Starts the effect of an ability". In some other cases there are multiple units mentioned in the event or the triggering unit is not even mentioned at all, then you have to take a good look which unit will probably be the triggering unit.

Anyway, you have to set TempReal (which is a global variable) to the amount that the caster has to heal.
If we use the values from the actual ability and remove the ability power scaling of the effect, we get these values:
15 / 25 / 35 / 45 / 55
So you have (5 + 10 X (level)).

So you set TempReal to (5 + (10 x (Level of ability being cast)))
Remember to use Arithmetics twice now.
The level of the ability is an integer (non-decimal-number) and you want a real (decimal-number).
So you have to do "Conversion - Convert integer to real".

Your trigger should now look like this:
  • Vladimir Transfusion
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Transfusion (Vladimir)
    • Actions
      • Set TempReal = (5.00 + (10.00 x (Real((Level of Transfusion (Vladimir) for (Triggering unit))))))
      • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + TempReal)
Now you only have to do the damage.
You can set the life of the targeted unit to a lower value indeed but that would be stupid because then the caster will not get the credits for killing the unit for example.

So we use a different option: "Unit - Damage Target".
  • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing 500.00 damage of attack type Spells and damage type Normal
You have to make the triggering unit deal damage to the targeted unit of the ability. Be aware that this is NOT "targeted unit" but "targeted unit of ability being cast".

The damage should not be 500 though. We can use the same method as before with the TempReal as value. (This is simply to be able to change the values more easily. You can indeed also set the actual value in that field of that function.)

Going back to the wiki, we read:
90 / 125 / 160 / 195 / 230
So you have (55 + 35 X (level)).
So you set TempReal to (55 + (35 x (Level of ability being cast)))

Now the trigger is complete and ready to be used.
  • Vladimir Transfusion
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Transfusion (Vladimir)
    • Actions
      • Set TempReal = (5.00 + (10.00 x (Real((Level of Transfusion (Vladimir) for (Triggering unit))))))
      • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + TempReal)
      • Set TempReal = (55.00 + (35.00 x (Real((Level of Transfusion (Vladimir) for (Triggering unit))))))
      • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing TempReal damage of attack type Spells and damage type Normal
Sanguine Blood and Hemoplague are pretty hard to do actually.
But I think that if you take your time to think about them one by one that Tides of Blood and Hemoplague could be achieved.

EDIT:
Also it's a bit different that I was looking for, I mean system is great, but how I do visual effect? I have blood projectile model and I need that it fly to my hero and would be perfect if he gets heal when this blood reaches him. Any ideas?
Well... what you want in that case is to make a missile that travels from the target to the source and apply the heal when it arrives at the source.

To do that, you require a missile system.
You can use mine (but is still under development) or use another one from the spell resource section.
What you want it to do is to heal the target... The best option would be if that missile system has an on-collide event but if it simply supports a heal than it is alright too.

The second option requires a damage detection system.
In that case, you create a custom ability based of Acid Bomb and set the damage to 1 and the duration of the buff to 0.01.
When a unit takes damage, check if that unit has the "Transfusion Heal" buff and if so then remove that buff and heal the target.
This method is less recommended but still works 100%.

It is your call.
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
This is done in the object editor.
Find a base war3 spell without any many side effects, it should be close to:
Single unit target
No hard buff applications

One option is finger of death. (I think)

Set damage dealt to 0
If it has some effect set its duration to 0 or 0.01 (To some spells 0 means infinite duration) Remove buffs
Change the projectile to a your blood model
Change stats
Change tooltips
Rename
Etc.

Edit2// Please read through everything Wietlol has written, it may have some volume and look overwhelming but will help you a lot to understand what the hell is happening in a trigger, and this particular spell although not all of its aspects are covered. ;)

Edit//@Wietlol
Sanguine pool can be just a metamorphosis with some triggered immolation-like aura which heals
Hemoplague can be just a dummy point target ability with delayed damage
Torrents of Blood can be a bit tricky because you have to keep track of how many times it has stacked AND it increases all his healing which means all other spells will have to be modified accordingly.
His passive is easy.

I do not think that they are that hard, except the Sanguine pool as it has the most mechanics of all and updates his other spells.
 
Last edited:
Level 24
Joined
Aug 1, 2013
Messages
4,657
@Wietlol
Sanguine pool can be just a metamorphosis with some triggered immolation-like aura which heals
Hemoplague can be just a dummy point target ability with delayed damage
Torrents of Blood can be a bit tricky because you have to keep track of how many times it has stacked AND it increases all his healing which means all other spells will have to be modified accordingly.
His passive is easy.

I do not think that they are that hard, except the Sanguine pool as it has the most mechanics of all and updates his other spells.

That is not really true.
Lets start with Hemoplague.
You have to give multiple units a buff that increase the damage to that unit.
For that you require a DDS.
Then you have to deal damage when the buff expires.
You can indeed do this with a timer that ends just before the buff ends and check if that unit still has the buff but it would be hardcoded duration then.
This abiliy however is one of the examples (without the increased damage) in my EOT System's test map.

Sanguine pool is a bit different.
The invulnerability, damage, healing and slow effects are very easy indeed.
However you are not going to make that movement speed buff that decreases over time so easily.
I haven't checked if there is a system for that but could be nice.

Tides of Blood active requires you to check for avaiable targets.
So you have to know stuff about ordering units. (just eye candy instead of "starts casting")
The buff can also be done easily with my EOT System.

"His passive is easy."
Is that sarcasm?
You don't have AP in WC3 so you have nothing to increase and nothing to have as scaling basis to increase health.

@DrTema:
Do you have the models for the basic attacks/transfusion/tides of blood ?
They all could use the same model.
And do you have a model for Hemoplague (on-cast, buff and damage (buff and damage could be one though))?
I actually got the urge to make it now.

(I already have vladimir's model, sanguine model and the proper icons.)
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
That is not really true.
Lets start with Hemoplague.
You have to give multiple units a buff that increase the damage to that unit.
For that you require a DDS.
Then you have to deal damage when the buff expires.
You can indeed do this with a timer that ends just before the buff ends and check if that unit still has the buff but it would be hardcoded duration then.
This abiliy however is one of the examples (without the increased damage) in my EOT System's test map.

Oooh, ok, I did not know that his ult increased all damage to the targets... Just looked it up on the wiki. Point made.
Sanguine pool is a bit different.
The invulnerability, damage, healing and slow effects are very easy indeed.
However you are not going to make that movement speed buff that decreases over time so easily.
I haven't checked if there is a system for that but could be nice.
Oook... I did not know of the ms too...
Although, the ms can be achieved with... wait, do Boots of Speed stack ?
Aaanyway, if they do you can just calculate how much ms has to be added and force it with few copies of boots of speed every 0.25 seconds.
"His passive is easy."
Is that sarcasm?
You don't have AP in WC3 so you have nothing to increase and nothing to have as scaling basis to increase health.
Ability power = Inteligence
If you look at the spell I made up there I am using the casters inteligene to boost damage by the spell. I have always found it unpleasant when caster-type heroes in war3 have some fixed amount of damage in their spells which do not grow with them and are often left behind by str/agi heroes. And find them the hardest to balance if they do not have this sort of growth in their spells.

PS: Daamn... I did not know about a lot of vladimir's mechanics...
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Ability Power = Intelligence????

You realize that WC3 has differnet mechanics that LoL?

As you mentioned WC3 abilities do not stack with ant stats.
They do however increase basic attack damage. (Yes intelligence increases
basic attack damage. Ability Power only does that for 40% and only on buildings.)

If AP would increase AA dmg by 1:1 then I would have 1k damage on basic attacks with my Veigar :D

If you want to make abilities' effect scale on something (even cooldown or cost) then you have to trigger that.
To use INT as AP is the most obvious option indeed.
Then still... If you want to let Max-Health scale on INT and INT on Max-Health without letting them stack on each other, you have to do it very carefully.
1. You calculate the Max-Health and INT of the unit.
2. You give the unit "Attribute Bonuts (INT)" ability (1 INT per level) and set the level.
3. You give the unit a set amount of health based on the value you had before.
4. You save that value of health increase on the targeted unit (vladimir) in a hashtable.

Everytime 0.03 seconds of gametime (can be higher too because it is only an update loop)
1. Remove the int bonus ability
2. Remove the amount of max health from vladimir
3. Do the same as above.

It is indeed possible but you have to choose what you will use as AP.
In my current project I have removed STR/AGI/INT and even AAdmg and Armor because that is fcking hardcoded.

Then I added other stats like Spell Power etc.

EDIT:
I've taken a look at the list of chamions and I think that these abiliies are the only ones that are hard/impossible.
  • General - Stacks in Actives. (Just because you will not give it a beautifull look.)
  • Kalista - Martial Poise (The dash is hard to use in WC3 engine.)
  • Kalista - Fate's Call (You have to register ALL HEROES AND THEIR ABILITIES.)
  • Katarina - Voracity (Cooldown modification.)
  • LeBlanc - Mimic (Only changing the icon is hard.)
  • Nocturne - Shroud of Darkness (Requires a good Spell Engine.)
  • Sivir - Spell Shield (Requires a good Spell Engine.)
  • Taric - Gemcraft (Cooldown modification.)

I heard that Xonok is busy with a Cooldown system where you can change cooldown dynamically and stuff.
That would make me be able to make Taric's Gemcraft and Katarina's Voracity too.
I might have missed one or two abilites for champions that I never play but I think that I got most abilities in here.
 
Last edited:
Level 12
Joined
Mar 24, 2011
Messages
1,082
True that int != ap but it is the closest war3 counterpart.

...(1 INT per level)...
This is a bad idea, I have heard a lot of times around this forum, and a lot of senior members have advised me not to, that having an ability with more than 10 levels torments the engine.
So I do it with different abilities each having a stat gain of power of 2.
Meaning Ability 1 = 2^0, Ability 2 = 2^1, Ability 3 = 2^2, Ability 4 = 2^3 and so son
Then you force it from the last to the least like:
Code:
 X = Gain stat amount
for (i = 7; i > -1; i++)
{
  if (X < StatGainByAbility[i])
  {
      Add Ability[i] to unit
      X = X - StatGainByAbility[i]
  }
}
Ofcourse this works only if the Ability stacks as Attribute bonus, that is why I asked if boots of speed stack, if they don't, then right now I have no good idea how to achieve it.
LeBlanc - Mimic (Only changing the icon is hard.)
Use 3 different ult spells and swap them according to last cast spell ?
I do agree that all "Lower cool-down by Amount" are impossible to do in war3 and I have no idea how this could be achieved.

PS: @Wietlol I mostly do agree with you, your standpoints are correct
 
Level 5
Joined
Dec 31, 2013
Messages
121
So many stuff here. First of all thank you for answering. Yes I am not good at trigger, I've worked only with simples one and spell triggers with variables really hard for me. I don't know how much of them work and sometimes I don't know where they located.

I wanted to make just similar spell with similar effecte, but I could never imagine you will help so much. Thanks.
@DrTema:
Do you have the models for the basic attacks/transfusion/tides of blood ?
I don't have any sfx original model, only Vladmir model, I think this 2 sfx models will work great
http://www.hiveworkshop.com/forums/models-530/misile-64973/?prev=search=blood&r=20&d=list&page=3
http://www.hiveworkshop.com/forums/...le-207258/?prev=search=blood&d=list&r=20&t=10

I still have trouble with Transfusion visual effect. I have only ideas that I told before. Dummy unit from position of target will cast to me blood spell, but I don't know any missile spells without stun. Stormbolt, Firebolt and Icebolt have stuns. Maybe Death Coil? I tried but it seems like my own dummy will not attack me with this spell and If dummy will be enemy, I'll get notifications that my units is attacked and this is bad.

I got one more Idea. When I do spell, dummy unit with blood model will spawn at point of targeted unit and will travel to point under my hero. Point under my hero will always update and dummy unit will get orders to move to that new point (This updates need to make "dummy blood missile" homing). But I stuck here, I don't know how to make next Actions when dummy reaches point under my hero. When dummy reaches point, he should disappear and turn off this "update triggers".

OFFTOP: Is there any trigger that will make actions after unit is damaged? Not attacked, but damages, because event trigger "is attacked" starts before unit gets damage.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
you create a custom ability based of Acid Bomb
set Reading = OP^2

I will take a look at what I can do when I get home.

@nedio95
Using binary numbers is indeed very nice but I like less abilities.
Now that I think of it... I actually don't know why I said that you want that kind of ability :D
I use abilities with 10 levels:
Ability-1: 0,1,2,3,4,5,6,7,8,9
Ability-1: 0,10,20,30,40,50,60,70,80,90
Ability-1: 0,100,200,300,400,500,600,700,800,900
Ability-1: 0,1000,2000,3000,4000,5000,6000,7000,8000,9000

I know that with those 40 levels I can get to a max of 9,999 int and with binary numbers when you have 40 abilities, you get to a max of 1,099,511,627,776.
But I rather have 4 abilities than 14 (16,384).

... at least that would be if I at least use any of those at all.
Atm I just prefer to directly set the values and save them in a hashtable or array.
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
OFFTOP: Is there any trigger that will make actions after unit is damaged? Not attacked, but damages, because event trigger "is attacked" starts before unit gets damage.
Note: We went offtopic A LOT :D This thread moved from "Make vladimir Q" passed though "Make vladimir" and went into "Recreate LoL into war3"

The war3 community is pretty large and devoted and has made a few workarounds to detect basic attacks when they hit and damage in general, such systems are called Damage Detection Systems (DDS for short), you can find some on the spell section of this forum. For a while I was using Bribe's DDS but recently I discovered http://www.hiveworkshop.com/forums/spells-569/physical-damage-detection-gui-v1-2-0-1-a-231846/?prev=search%3Ddds%26d%3Dlist%26r%3D20 which has implemented way of detecting the difference between Physical (Basic attack), Spell and Triggered damage, so you will not need any extra coding.

"unit is atacked" runs when the atttacking unit starts its basic attack animation, meaning that the trigger will be run even before the unit actually attacks, which may lead to unwanted effects and is abuseable.

If you want a spell but not basic attack it is a lot easier because tehy ahve a lot more events.
As long as it is not channeled, the event "Unit - A unit starts the effect of an ability" should do you just fine as it runs when the spell missile hits the target.

@Wietlol A few years ago I was using the same method too but somehow passed on to powers of 2...
I believe one of my first threads was asking for help about how to use this method or something similar :p
 
Level 5
Joined
Dec 31, 2013
Messages
121
set Reading = OP^2
Don't know what this mean.

Here is triggers that I could make (this is reversed trigger, dummy walk from hero to enemy, but this is not matter), but as I said before need to make action after dummy reaches point. Hope you get the answer when get home.

030dfd2cce.png

b5932305e9.png
 
Last edited:
Level 24
Joined
Aug 1, 2013
Messages
4,657
number1^number2 is power in maths.
number1 is the base and number2 is the power.

When you do that, you multiply the base with itself equal to the amount of power.

4^2 = 4 X 4 = 16
4^8 = 4 X 4 X 4 X 4 X 4 X 4 X 4 = 65536

You might already know this but do not know that '^' is the sign for it.
In many textfields, you cannot write a little number a bit higher so you use that.



I still think you should use ACID BOMB.

@nedio95
Still discovering a DDS?
hmm...

I stopped using a DDS since I found out what it actually does.
I will not tell you what I use until I can show it to you in my next map.
But anyway... JASS scripters will love it.
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
@nedio95
Still discovering a DDS?
hmm...

I stopped using a DDS since I found out what it actually does.
I will not tell you what I use until I can show it to you in my next map.
But anyway... JASS scripters will love it.


Yeea... I was absent from THW for like 2 years, and got back just a few wekks ago... and this DDS was not around last time I was active
 
Level 3
Joined
Sep 7, 2013
Messages
47
WoW, nice, took me like 1 hour to build it, because I was looking for right triggers long time. I understand how trigger works, but I could never do it by myself.
Also it's a bit different that I was looking for, I mean system is great, but how I do visual effect? I have blood projectile model and I need that it fly to my hero and would be perfect if he gets heal when this blood reaches him. Any ideas?

I DO NOT KNOW ANYTHING ABOUT LOL (i just watched the vid) but I really understand this because it was just recently until I learn how to do things like this.

I will try to make this very simple.

I do believe that you understand how trigger works so I will be focusing on the visual effects you are talking about.

First of all you need Damage Detection System (I recommend "Physical Damage Detection" by looking_for_help aka eey). I mean, you need it definitely not just for this spell but for the future spell you are going to make. (Because I think you will be making spells based from other games so implementing mechanics will be a lot easier)
You might not need Missile System because 1. It takes time to understand especially if you are new to triggering 2. I myself can do that spell without a missile system.

Now this is important
Create a unique dummy unit using Object Editor. You must already know how to make dummy unit... BUT, this one is special. Apply Attack (i mean it) set damage to anything just not zero. Set your preferred projectile speed,missile art, set Animation Damage Point to zero, apply attack sounds etc. Just make the dummy able to attack but make sure to set attack cooldown greater than 1.0 (because we only want to dummy to attack once)
We will name the dummy BloodStealDummy

Now this is the hard part (not really)

Implement this first, i think this is the best way to do it

  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Transfusion
    • Actions
      • -------- CONFIGURABLES --------
      • -------- Vladimirs Q scales of ability power --------
      • Set Temp_IntScaling = 0.60
      • -------- Every level his Q gains that much damage. --------
      • Set Temp_DamagePerLevel = 35.00
      • -------- This is teh damage on level 1 --------
      • Set Temp_DamageBase = 90.00
      • -------- This is the percentage healing from damage dealt. In this case of my laziness it works more like spellvamp than his actual Q mechanics. --------
      • Set Temp_HealingPercentage = 0.30
      • -------- END CONFIGURABLES --------
      • -------- SPELL --------
      • Set Temp_Caster = (Triggering unit)
      • -------- DAMAGE PART --------
      • Set Temp_IntToDamage = ((Real((Intelligence of Temp_Caster (Include bonuses)))) x Temp_IntScaling)
      • Set Temp_Damage = ((Temp_DamageBase + (Temp_DamagePerLevel x ((Real((Level of Transfusion for Temp_Caster))) - 1.00))) + Temp_IntToDamage)
      • Unit - Cause Temp_Caster to damage (Target unit of ability being cast), dealing Temp_Damage damage of attack type Spells and damage type Normal
      • -------- HEAL PART --------
      • -------- This is not how vladimirs spell heals him but I am too lazy to do another formula so: --------
      • -------- He is healed for some percentage of the damage dealt. --------
      • Set Temp_Healing = (Temp_Damage x Temp_HealingPercentage)
      • Unit - Set life of Temp_Caster to ((Life of Temp_Caster) + Temp_Healing)

Now remove this last action
  • Unit - Set life of Temp_Caster to ((Life of Temp_Caster) + Temp_Healing)
Instead add this
  • Actions
    • Set Temp_TargetLoc = (Target point of ability being cast)
    • --------------Create the dummy--------------------
    • Unit - Create 1 BloodStealDummy for (Owner of (Temp_Caster)) at (Temp_TargetLoc) facing bla bla bla
    • --------------Apply expiration timer (must be lower than attack cooldown)----------------
    • Unit - Add a 1.00 second Generic expiration timer to (Last created Unit)
    • --------------Set custom value of last created dummy to the heal amount
    • Unit - Set custom value of (Last created unit) to (Integer(Temp_Healing))
    • ---------------Order the dummy to attack the caster------------------
    • Unit - Order (Last created unit) to Attack (Temp_Caster)
    • -------------Remove Leaks--------------
    • Custom script: call RemoveLocation(Temp_TargetLoc)
Why custom value? You are saving the heal value of the spell to the dummy for we will use that value on the next trigger.


note: Before continuing I assume you really understand how Damage Detection works. If not, I suggest you look up on that first.

Create this trigger
  • BloodStealSpell
  • Events
    • Game - PDD_damageEventTrigger becomes Equal to 1.00
This really depends based on the damage detection system you are using. Mine is (already stated above).

  • Conditions
    • (Unit-type of PDD_source) Equal to BloodStealDummy
  • Actions
    • Set PDD_amount = (Real((Custom value of PDD_source)) * -1.0)
Why (* -1.0) because negative damage is healing (you already know that)

I am pretty sure that will work (Also MUI, i hate non-mui things). Because i have spells like that and that is the way I do it (but with JASS) However I still think its still the same
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
@Mirage_tempest replace this line:
  • Set PDD_amount = (Real((Custom value of PDD_source)) * -1.0)
with:
  • Set PDD_amount = 0
  • Unit - Set life of Temp_Caster to ((Life of Temp_Caster) + (Custom value of PDD_source))
PS:I totally forgot that vladimir's Q travels backwards :p
 
Level 3
Joined
Sep 7, 2013
Messages
47
So... Are you really really sure that you want to let the heal be reduced by armor and attack-type?

I don't think so.

Of course no. And by how the "heal" be affected by armor and attack-type? :)

@Mirage_tempest replace this line:
  • Set PDD_amount = (Real((Custom value of PDD_source)) * -1.0)
with:
  • Set PDD_amount = 0
  • Unit - Set life of Temp_Caster to ((Life of Temp_Caster) + (Custom value of PDD_source))
PS:I totally forgot that vladimir's Q travels backwards :p

No, nedio95. It is fine as it is. PDD_amount automatically overrides damage. So even if the BloodStealDummy unit has a 99999 damage, it doesn't matter.

Wait... are you also trying to destroy unit indexers?

Not that I ever use them but still, WHY?

Yeah. If the user is worried about unit indexes then, instead of using custom values...use this instead

from the first trigger...
  • Unit - Set Life of (Last created unit) to Temp_Healing
and

from the second trigger
  • Set PDD_amount = (Life of (PDD_source)) * -1.0)
just make sure regeneration of the BloodStealDummy is set to 0
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
Weeel... the dummy unit does not really need to be indexed... still, true, well this is the easiest way I assume, anything else will require more variables and complication. And who told you that he is using unit indexing system ? (Or he wrote it somewhere and I was too lazy to read through -_- )

Edit// Oh, wait, Mirage_tempest is actually right, the PDD_amount is not affected by armor if you change it :p
 
Level 5
Joined
Dec 31, 2013
Messages
121
This is Great! Works nice and clean. I'll try to figure myself how does your triggers works, but would be awesome if you explain. (I mean this missle system)
Although I don't like visual effect, I think better use blood models that I've posted, they looks better and they don't have meat and bones.

Yet not tried Mirage_tempest system, don't have much free time right now.

Also I don't get where I should use this "set Reading = OP^2"
 
Last edited:
Level 24
Joined
Aug 1, 2013
Messages
4,657
Well the thing is that I said that you should use Acid Bomb twice and you still asked what ability exist that is a unit target missile without stun.
So reading is better than doing great stuff ;)

But anyway to explain what happens:
  • Transfusion Effect
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Transfusion (Vladimir)
    • Actions
      • -------- -------------------- --------
      • -------- Set variables --------
      • -------- -------------------- --------
      • Set TempUnit = (Triggering unit)
      • Set TempReal = (Real((Level of Transfusion (Vladimir) for TempUnit)))
      • Set AP = (5.00 x (Real((Intelligence of TempUnit (Include bonuses)))))
      • -------- --------------------- --------
      • -------- Deal damage --------
      • -------- --------------------- --------
      • Set TempReal2 = (55.00 + ((35.00 x TempReal) + (0.60 x AP)))
      • Unit - Cause TempUnit to damage (Target unit of ability being cast), dealing TempReal2 damage of attack type Spells and damage type Normal
      • -------- --------------------------- --------
      • -------- Create the missile --------
      • -------- --------------------------- --------
      • Custom script: call CMS_Set_Default_Variables()
      • Set CMS_Param_Target_Type = CMS_TT_Unit
      • Set CMS_Param_Target_Unit = TempUnit
      • Set TempLocation2 = (Position of CMS_Param_Target_Unit)
      • Set CMS_Param_Starting_Location = (Position of (Target unit of ability being cast))
      • Set CMS_Param_Starting_Height = 70.00
      • Set CMS_Param_Missile_Angle = (Angle from CMS_Param_Starting_Location to TempLocation2)
      • Set CMS_Param_Missile_Source = TempUnit
      • Set CMS_Param_Missile_Model = CorspeBomb.mdx
      • Set CMS_Param_Missile_Speed = 900.00
      • Set CMS_Param_Collision_Delay = 0.00
      • Set TempAbility = Transfusion (Vladimir)
      • Custom script: set udg_TempInteger = udg_TempAbility
      • Set CMS_Param_Missile_Type = TempInteger
      • Set CMS_Param_Missile_Width = 30.00
      • Set CMS_Param_Turn_Rate = 3.00
      • Set CMS_Param_Is_Homing = True
      • Trigger - Run CMS_Trigger_Create_Missile (ignoring conditions)
      • Sound - Play Ability__Vladimir_Transfusion__Effect <gen> at 100.00% volume, attached to CMS_Param_Missile
      • -------- --------------------------- --------
      • -------- Set custom value --------
      • -------- --------------------------- --------
      • Set TempReal2 = (5.00 + ((10.00 x TempReal) + (0.25 x AP)))
      • Custom script: call CMS_Save_Real(0, udg_TempReal2)
      • Custom script: call RemoveLocation(udg_TempLocation2)
First of all, you have to know what ability is actually cast.
That is the event and condition.

Then you set a few variables that we will need later on.
TempUnit is the caster, TempReal is the level of the ability and AP is the AP of the unit.
(Because WC3 does not know what AP is, we have to tell it ourselves. In these abilities, I set (AP = 5 X INT))

Now to the effects:
You want to deal damage to the targeted unit, so you set TempReal2 (because 1 is the level) to the value of the damage. According to the wiki, this spell deals (55 + 35 X level + 0.6 X AP).
Then you apply that damage to the targeted unit.

After that, you want to create a missile from the target to the source that heals the source on collision.
Everything between "Custom script: call CMS_Set_Default_Variables()" and "Trigger - Run CMS_Trigger_Create_Missile (ignoring conditions)" is the settings of the missile.
This includes the speed, model, starting location, collision type, target and source, etc etc etc.
To make it look better, we also make a sound (sounds can be made in the sound editor).
After the missile is created, we can add custom data to that missile.
"Unit - Set the custom value of TempUnit to 100" that action is pretty much the same as what I do but I can set almost limitless custom values and I can also set different values than only integers.
In this case, I set a real value that is the amount of healing that will be done to Vladimir.
According to the wiki, the healing is (5 + 10 X level + 0.25 X AP)

  • Transfusion Heal
    • Events
      • Game - CMS_Event_Missile_Collided_U becomes Equal to 0.00
    • Conditions
    • Actions
      • Set TempAbility = Transfusion (Vladimir)
      • Custom script: set udg_TempInteger = udg_TempAbility
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CMS_Param_Missile_Type Equal to TempInteger
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CMS_Param_Collided_Unit Equal to CMS_Param_Target_Unit
            • Then - Actions
              • Custom script: set udg_TempReal = CMS_Load_Real(0)
              • Unit - Set life of CMS_Param_Collided_Unit to ((Life of CMS_Param_Collided_Unit) + TempReal)
              • Set CMS_Param_Destroy = True
            • Else - Actions
        • Else - Actions
Now we also have a trigger that has to run when the missile collides with the source.
In the missile system that I used to make the missile, I have the event "CMS_Event_Missile_Collided_U" (This event is fired when the missile collides with a unit.)

When that happens, you check which missile it is. This is the same as "(Ability being cast) Equal to Transfusion (Vladimir)".
The only difference is that this must be done in the actions instead.

When you create a missile, you must also set an integer called "CMS_Param_Missile_Type".
This integer is the "missile type id". When a missile collides, you check if that missile has the same missile type id as the missile type you are looking for.
If that missile is the "Transfusion Missile", you check if the collided unit is the source/target.

If that is true, then you load the real custom value from the missile and heal the target with that amount.
After that, you have to tell that the missile has to be destroyed.
So you set "CMS_Param_Destroy = True".

That is basically what Transfusion is.
If you are interested in more... check out the map in the attachment. It includes all abilities of vladimir now.
 

Attachments

  • Vladimir.w3x
    421.3 KB · Views: 67
Level 5
Joined
Dec 31, 2013
Messages
121
Nice, very nice, great work I would say! Thank you for explaining too, but why when I add model and save map, I can't launch map any more? It opens main menu.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Save the map before testing.
when you see main menu, there is an error in the map.
i think that you forgot to copy the header file or you havent got all variables.
i didnt make that map to let everyone be able to just copy and paste it
if you want that then i have to add some stuff
 
Level 5
Joined
Dec 31, 2013
Messages
121
Well the thing is that I said that you should use Acid Bomb twice and you still asked what ability exist that is a unit target missile without stun.
So reading is better than doing great stuff ;)

Ah, I just misunderstood you, This "set Reading = OP^2" is looks like some kind of function and I've thought I should use it somewhere in world editor...lol. Sorry for my stupidity.

Well, I managed to do this skill with Acid Bomb and DDS system, thanks for advice and Mirage_tempest too, now I know how to use this DDS system a bit, just don't know what's the difference between PDD_damageEventTrigger = 1 and PDD_damageEventTrigger = 0


i didnt make that map to let everyone be able to just copy and paste it
if you want that then i have to add some stuff
Ah so that's why I couldn't edit this map, because it's "broken" and I've thought it was something wrong with my jassnewgen + weu editor. I've spend like half a day to figure this out.

Save the map before testing.
when you see main menu, there is an error in the map.
i think that you forgot to copy the header file or you havent got all variables.
I was talking about your last map here. Could you please make it complete and PM me (if you not interested to open for everyone) or post it here.
I would like to put in it original spell sounds.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Well you can actually copy and paste the triggers from that map.
You just have to make all variables yourself.
To avoid this, go to Terrain Editor -> File -> Preferences -> General, and check "Automatically create unknown variables while pasting data".

In this map, I didn't remove the automatic global variable triggers.
If you copy and paste the disabled triggers into your map then it is all fine.
 

Attachments

  • Vladimir.w3x
    424.3 KB · Views: 111
Level 5
Joined
Dec 31, 2013
Messages
121
Thanks again!

I've looked into model, did you made those morphing animations with blood by yourself?
 
Level 5
Joined
Dec 31, 2013
Messages
121
Yes, I have his models, but there isn't blood pool model, you added it, right?? It would be really great to add this effect to Blood Lord Skin (best Vladimir skin). I can add it with Mldvis this model, but don't know how to animate it, and make appear only in 1 animation, this is gonna be problem.
 
Level 5
Joined
Dec 31, 2013
Messages
121
Now it will be really big problem copy all this into another map, especially when all those ID's is busy for another units/spells.
 
Last edited:
Status
Not open for further replies.
Top