HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Making Death Coil Heal self after attack?

11-09-2003, 11:00 PM#1
Omega_Destroyer
ok, how do i do this. My hero will cast Death Coil. It will do the damage, but i want it to heal the casting unit as well. How is this done? And, no i cannot base the spell of Death pact, dark ritual, or Life Siphon
11-09-2003, 11:30 PM#2
SourGummiWorm
ah, you mean like in WC2 where the spell heals the DK the number of hitpoints it takes away....

You can do it with a trigger. make something where the event is a spell is cast. do a check on the damage taken by the unit. Although I am not positive this will work... you can always just make the check be what level coil is, and add either 100,200 or 300 hp respectively. But then if you kill a unit with 12 hp, your hero will still be healed the full amount... Mess around with trying to get the amount of damage caused if you don't want to use the second idea.
11-10-2003, 12:38 AM#3
Zachary_Shadow
A very simple trigger would do it :)

As soon as I get the time, I'll post how to do it :) (can't get to WE right now)

EDIT: Here u go

Untitled Trigger 001
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Death Coil
Actions
Unit - Set life of (Casting unit) to ((Life of (Casting unit)) + 50.00)

Any questions ?
11-10-2003, 01:16 AM#4
Omega_Destroyer
i know that works for the lv 1 spell, but what about lv 2 and 3?
11-10-2003, 01:22 AM#5
Zachary_Shadow
Well, dunno how good you are with triggers...

But, you will need to set a variable that increases each time the skill is learned. Then set an if/then/else with the conditions reading:

If DeathCoilLevel = 1
then
bla bla bla, what level 1 needs to heal for

If DeathCoilLevel = 2
then
bla bla bla, what level 2 needs to heal for

And so on :)

If u don't know how to do this, let me know and I'll do the trigger for you. But I urge you to take a close look at it and try to understand how it works :)
11-10-2003, 01:31 AM#6
Omega_Destroyer
Quote:
Unit - Set life of (Casting unit) to ((Life of (Casting unit)) + 50.00)


ok i know the that trigger, but how do i make it Unit - Set life of (Casting unit) to ((Life of (Casting unit)) + 50.00)) part
11-10-2003, 01:39 AM#7
Zachary_Shadow
Quote:
Originally posted by Omega_Destroyer
ok i know the that trigger, but how do i make it Unit - Set life of (Casting unit) to ((Life of (Casting unit)) + 50.00)) part


You will need to pick Arithmic, and then pick: Life of (Casting unit)
11-10-2003, 01:51 AM#8
Omega_Destroyer
Thanks. Works now.
11-10-2003, 01:52 AM#9
FF_Behemoth
You know ZS, If the target has 1 HP, it will always heal the caster by that set amount (in this case 50). Heres the complete trigger

E- Unit - A unit Learns a skill
A- Custom script: set udg_SkillMatch = ( GetLearnedSkillBJ() == 'XXXX' )
A- If (SkillMatch Equal to False) then do (Skip remaining actions) else do (Do nothing)
A- set ConsumeInteger = ConsumeInteger + 1

E- Unit - A unit Is issued an order targeting an object
C- (Issued order) Equal to (Order(deathcoil))
A- Set ConsumeTarget = (Target unit of issued order)

E- Unit - A unit Starts the effect of an ability
C- (Ability being cast) Equal to Consume..........
A- Set ConsumeCaster = (Casting unit)
A- If then else
---If ConsumeInteger = 1 then
------Then actions- run consumeLevel1 (ignoring conditions)
------Else actions- do nothin
A- If then else
---If ConsumeInteger = 2 then
------Then actions- run consumeLevel2 (ignoring conditions)
------Else actions- do nothin
repeat this depends on how many lvl your spell is

consumeLevel1 <---trigger name
E- n/a
C- n/a
A- A- If then else
---If (Life of DeathCoilTarget) Less than or equal to 75.00
------Then actions- Unit - Set life of DeathcoilCaster to ((Life of DeathcoilCaster) + (Life of DeathCoilTarget))
------Else actions- Unit - Set life of DeathcoilCaster to ((Life of DeathcoilCaster) + 75.00)

consumeLevel2 <---trigger name
E- n/a
C- n/a
A- A- If then else
---If (Life of DeathCoilTarget) Less than or equal to 150.00
------Then actions- Unit - Set life of DeathcoilCaster to ((Life of DeathcoilCaster) + (Life of DeathCoilTarget))
------Else actions- Unit - Set life of DeathcoilCaster to ((Life of DeathcoilCaster) + 150.00)
11-10-2003, 01:56 AM#10
Zachary_Shadow
Learn Soul Clash
Events
Unit - A unit Learns a skill
Conditions
Actions
Custom script: if ( not ( GetLearnedSkillBJ() == 'A008' ) ) then
Custom script: return false
Custom script: endif
Set Soul_Clash = (Soul_Clash + 1)


This is a trigger that is really good for registering what level is being learned. The good thing about this, is that it can also be used for custom skills. All you got to do, is go to view and all the way at the bottom is a point that says: View raw data (or something like that) click that and it will show you numbers on the skills.

A008 is the reference for my skill, this is different from map to map, so remember to change this. Otherwise it's easy just to add the custom scripts.

The integer (soul_clash) will need to be your integer and will determin the level from then on as the skill is used.

Credit to Vex for teaching me this :)
11-10-2003, 02:02 AM#11
Zachary_Shadow
Quote:
Originally posted by FF_Behemoth
You know ZS, If the target has 1 HP, it will always heal the caster by that set amount (in this case 50). Heres the complete trigger


Actually yes, that was the whole idea :) Not to have it heal for the amount damaged for, but for a fixed amount :) Which makes it VERY simple :)

Nice trigger though, I might have to use that for a spell :) Gj
11-10-2003, 02:15 AM#12
FF_Behemoth
I knew that you knew that (gawd, that sounded weird) Congras on being a Mod btw.
11-10-2003, 02:17 AM#13
Zachary_Shadow
Quote:
Originally posted by FF_Behemoth
I knew that you knew that (gawd, that sounded weird) Congras on being a Mod btw.


Thx :) I was sure u knew that...nooo..not falling into that one :P

Either way, Omega, you got some awesome triggers here to work with depending on what you want the spell to do :)

Good luck with it
11-10-2003, 03:15 PM#14
Omega_Destroyer
One question: How do i make Custom Scripts *is it the jass?*
11-10-2003, 03:32 PM#15
Plasma[Blade]
I believe you do Custom Scripts by using the "Custom Script" trigger. I could be wrong, though. ;)