Condition Problem

Pigger

New Member
Reaction score
13
Back again, this time I'm trying more simple spells to fit my expirience level.

I have an ability based off Storm Bolt, that is supposed to do something if the unit that is hit by Storm Bolt is killed, here is part of my trigger:

Code:
Steal
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Bone Stealing
    Actions
        Set Skeleton = (Casting unit)
        Set SkelePos = (Target point of ability being cast)
        Wait 0.30 seconds
        Animation - Play Skeleton's death animation
        Unit - Pause Skeleton
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
[B][COLOR="Red"]                ((Target unit of ability being cast) is dead) Equal to True[/COLOR][/B]
            Then - Actions
-----Random Stuff------
            Else - Actions

The condition in red is what I'm having a problem with. Perhaps I'm using the wrong condition, but even so it shouldn't happen.

When I cast the spell, it hit's the unit and then the "Then" actions go off, even if the unit hit did not die from the spell. Anyone know what to do?*

*Please :D
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
At start.. you have to store the "target of ability being cast" in a variable..like this:
Set UnitVariable = (Target of ability being cast)

then... you use the unit variable in the condition INSTEAD OF "target of ability being cast".... Because after a wait, there is no target of ability being cast. Target of ability being cast is just there, when the ability is being cast...You feel me? :) Good!

And btw; there is no need to store the "triggering unit" (in this case, casting unit) in a variable if you are just using THAT specific trigger. If it doesnt involve other triggers...goood :)

Arg, why explain when i can rather show?
Code:
Actions
        Set[COLOR="Magenta"] UnitVariable = (Target of ability being cast)[/COLOR]
        Set SkelePos = (Target point of ability being cast)
        Wait 0.30 seconds
        Animation - Play Skeleton's death animation
        Unit - Pause Skeleton
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ([COLOR="magenta"]UnitVariable)[/COLOR] is dead) Equal to True
            Then - Actions
-----Random Stuff------
            Else - Actions
 
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