Ability not finishing when killing a unit

Fung

New Member
Reaction score
0
Code:
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Free Souls 
    Actions
        Unit - Kill (Target unit of ability being cast)

I copied mana burn to create Free Souls. The point of the ability is exactly what it says. There are tormented children in my map and a quest requires you to free their souls.

I want the unit to die, that happens, but not instantly. I want the ability to finish its bolt then play the units death animation and have a couple special effects fire off on the corpse. I tried using "Wait" but then the unit doesn't die.

Thoughts? Thanks!
 

HydraRancher

Truth begins in lies
Reaction score
197
simple change begins the abillity to finishes ability and use the special effect trigger

Trigger:
  • Unit - A unit Finishes casting an ability
Trigger:
  • Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Objects\Spawnmodels\Undead\UndeadDissipate\UndeadDissipate.mdl
 

Fung

New Member
Reaction score
0
I have tried that and 'Stops casting an ability' using either doesn't kill the unit.
 

HydraRancher

Truth begins in lies
Reaction score
197
let me pull a trigger.
Trigger:
  • Kill
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Free Soul
    • Actions
      • Unit - Kill (Target unit of ability being cast)
      • Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Objects\Spawnmodels\Undead\UndeadDissipate\UndeadDissipate.mdl

try this. if not this
Trigger:
  • Kill
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Free Soul
    • Actions
      • Wait 1.00 seconds
      • Unit - Kill (Target unit of ability being cast)
      • Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Objects\Spawnmodels\Undead\UndeadDissipate\UndeadDissipate.mdl
 
Reaction score
86
Make a global unit variable called UNIT
Events
A unit starts the effect of an ability

Condition
(w/e)
Actions-
Custom Script: local unit udg_UNIT = GetSpellTargetUnit()
Wait X seconds
Unit - Kill UNIT
 

Fung

New Member
Reaction score
0
let me pull a trigger.
Trigger:
  • Kill
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Free Soul
    • Actions
      • Unit - Kill (Target unit of ability being cast)
      • Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Objects\Spawnmodels\Undead\UndeadDissipate\UndeadDissipate.mdl

try this. if not this
Trigger:
  • Kill
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Free Soul
    • Actions
      • Wait 1.00 seconds
      • Unit - Kill (Target unit of ability being cast)
      • Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Objects\Spawnmodels\Undead\UndeadDissipate\UndeadDissipate.mdl

Neither works. :(

Infinitegde said:
Make a global unit variable called UNIT
Events
A unit starts the effect of an ability

Condition
(w/e)
Actions-
Custom Script: local unit udg_UNIT = GetSpellTargetUnit()
Wait X seconds
Unit - Kill UNIT

Not very familiar with scripting, but this didn't work either.
 

Fung

New Member
Reaction score
0
Code:
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Free Souls 
    Actions
        Unit - Kill (Target unit of ability being cast)
        Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Objects\Spawnmodels\Undead\UndeadDissipate\UndeadDissipate.mdl

Hah combing both your suggestions did the trick!
 

Naga'sShadow

Ultra Cool Member
Reaction score
49
Your issue is the finish casting event. You can't find the spell target with that event, use starts the effect of. Just use a wait if you need to get the timing together.
 

Fung

New Member
Reaction score
0
For future reference of anyone who has a similar problem with the wait command. I resolved my problem by using "Target of current camera view" instead of "Target of ability being cast".
 

saw792

Is known to say things. That is all.
Reaction score
280
Despite the fact that "Target of current camera view" is sure to cause undesired results.

You need to save the target unit to a variable as the target unit is lost through a wait. Infinitegde has the right trigger.
 

Dirac

22710180
Reaction score
147
Set Some_Unit = Target Unit of Ability Being Cast
wait 0.9 secs
Kill (Some_Unit)

This trigger is very simple. No need for scripts.

NOTE: Dont Use The Some_Unit Variable for other triggers!
 

Fung

New Member
Reaction score
0
Both of you are right, but in my map my method works. Just like people to know there are 2 ways to skin a cat.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top