Ability on attack?

Lord_Kakashi

The Wabbits are attacking
Reaction score
27
Okay so i searched a bit and couldn't find anything about this..

How would I go about making a trigger which caused a unit to cast a spell when it's issued an attack order? (instead of attacking)

Basically i want a tower which casts Chain lightning when a unit comes near it instead of using its regular attack.. e.g. when it begins auto-attacking that unit.

I know i could use bounce for this one, but i might need the same for different abilities.. Any thoughts?

This is what i have so far.
Code:
Lightning Demon
    Events
        Unit - A unit Is issued an order targeting an object
    Conditions
        (Unit-type of (Ordered unit)) Equal to Chain Demon
    Actions
        Unit - Order (Triggering unit) to Orc Far Seer - Chain Lightning (Target unit of issued order)

But it doesn't work.
 

THE_X

New Member
Reaction score
49
Condition ===> (Issued order) Equal to (Order(attack))

Actions: Order Triggering unit to stop
Order Triggering unit to chain lightning.
 
K

Kinorhykar

Guest
You can open up Skibi TD it has alot of such towers and triggers to follow from.
 

vypur85

Hibernate
Reaction score
803
Code:
Test
    Events
        Unit - A unit Is attacked
    Conditions
    Actions
        Unit - Order (Attacking unit) to Orc Far Seer - Chain Lightning (Triggering unit)

Have you tried this? I think the unit won't perform an attack to the target. It will just cast the spell everytime it starts to attack.

If you mean the order, then this could be it:
Code:
Test2
    Events
        Unit - A unit Is issued an order targeting an object
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Issued order) Equal to (Order(attack))
                (Issued order) Equal to (Order(smart))
    Actions
        Unit - Order (Triggering unit) to Orc Far Seer - Chain Lightning (Target unit of issued order)
 

Lord_Kakashi

The Wabbits are attacking
Reaction score
27
Condition ===> (Issued order) Equal to (Order(attack))

Actions: Order Triggering unit to stop
Order Triggering unit to chain lightning.

tried that.. doesnt work
Test
Events
Unit - A unit Is attacked
Conditions
Actions
Unit - Order (Attacking unit) to Orc Far Seer - Chain Lightning (Triggering unit)

This did the trick, thank you.
 
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