Destroy both Caster and Target

For fulfilled maps that most likely don't work on the latest patch (1.24 or later).

Moderator: Cheaters

TechGeek001
Member
Posts: 50
Joined: December 29th, 2007, 7:34 am

Destroy both Caster and Target

Post by TechGeek001 »

I'm working on this trigger for a custom ability that won't work. What it's supposed to do is work like posession, but instead on converting the target unit, it kills it - it's how I plan on controlling high level heroes in this particular map.
What I've got is this:

Events:
A unit finishes casting an ability
Conditions:
Ability being cast is equal to Destroy Mind
Actions:
Kill Targeted Unit
Kill Casting Unit

But it won't kill the targeted unit. Which kinda defeats the purpose of the whole thing.
Destroy Mind is based on Death Coil, so...not quite sure what I'm doing wrong here. Any help would certainly be appreciated.
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: Destroy both Caster and Target

Post by Aero »

Code: Select all

Destroy Mind
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Destroy Mind
    Actions
        Unit - Kill (Triggering unit)
        Unit - Kill (Target unit of ability being cast)
You need to use 'Unit starts the effect of an ability'

The only flaw here in that death coil takes some time to hit the target..therefore it would die instantly then the coil could hit.
I recommend using a finger of death that deals 9999999999 damage and then only kill Triggering Unit (As the 9999999 dmg will kill target)
User avatar
tru_power22
Old Wrinkly Member
Posts: 271
Joined: January 12th, 2008, 4:42 am
Title: Re-R-Re-Re-Remix
Location: Canada EH?

Re: Destroy both Caster and Target

Post by tru_power22 »

It should be casting unit, not triggering unit. :o
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: Destroy both Caster and Target

Post by Aero »

Not true.

Triggering Unit responds to the unit which fired off the event. In this case, it's the casting unit so they are interchangeable. I use Triggering Unit because it's a faster function call than Casting Unit.
Dark_slayer18
Member
Posts: 65
Joined: December 22nd, 2007, 12:49 am

Post by Dark_slayer18 »

Last edited by Dark_slayer18 on November 12th, 2014, 10:25 pm, edited 1 time in total.
Durchdringen
Honorary wc3edit.net Traitor
Posts: 468
Joined: December 10th, 2007, 10:50 pm
Title: The Professional
Location: USA

Re: Destroy both Caster and Target

Post by Durchdringen »

Dark_slayer18 wrote:
Let me tell you that to correct Aero at a spell your going to need Serious intelligience
Lol, so true, Aero is a fuckin genius when it comes to triggers. Props to Aero cause he will make a trigger work LANSD!
Do you support Durchdringen? If so, add the spoiler to your sig. Durch cares for you, so show your support for Durch!
Spoiler:
(broken image) Thanks for the support!