Spell tigger not working

shinami

Redirect your complaints to the nearest wall
Reaction score
47
Haven't done any triggering in a while so now i'm confused to why this spell trigger isint working. Its a channeling ability that is supposed to create illusion of you every 0.5 second draining 200 mana.

Code:
Illusions
    Events
        Unit - A unit Begins channeling an ability
    Conditions
        (Ability being cast) Equal to (==) Illusions 
    Actions
        Set TriggeringUnit = (Triggering unit)
        Set UnitPointVariable[0] = (Position of (Triggering unit))
        Set OwnedUnit = (Owner of (Triggering unit))
        Trigger - Turn on Periodic Illusions <gen>
        Wait 9.50 seconds
        Trigger - Turn off Periodic Illusions <gen>

Code:
Periodic Illusions
    Events
        Time - Every 0.50 seconds of game time
    Conditions
    Actions
        Unit - Create 1 Dummy for OwnedUnit at UnitPointVariable[0] facing UnitPointVariable[0]
        Hero - Create Wand of Illusion and give it to (Last created unit)
        Hero - Order (Last created unit) to use (Last created item) on TriggeringUnit
        Unit - Set mana of TriggeringUnit to ((Mana of TriggeringUnit) - 200.00)

Now what i think is the problem is that the dummy is a unit obviously and the action is for heroes, but i couldn't find a "order unit to use item on unit" anywhere, or i'm blind. Help would be appreciated.

Forgot to mention the problem. All it does is create wands of illusions all around me.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Couldn't you just give the ability Wand of Illusions has that makes it create illusions and modify it and give it to the dummy because i don't think the dummy has an inventory =(
 

shinami

Redirect your complaints to the nearest wall
Reaction score
47
Couldn't you just give the ability Wand of Illusions has that makes it create illusions and modify it and give it to the dummy because i don't think the dummy has an inventory =(

Simple, logical, yet something i couldn't think off. Thanks, btw the dummys have an inventory, i gave them.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,494
Custom script: call IssueTargetOrderById(bj_lastCreatedUnit, 852274, GetTriggerUnit())
This orders the "last created unit" to "item illusion" the "triggering unit".

Alternatively, give it the item and order it to "use item on unit".
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top