An abilities error with trigger.

Status
Not open for further replies.
Level 5
Joined
Apr 17, 2010
Messages
124
If anyone knows yet, I'm fail triggering. I have a td I've made a few versions of, and I've gone onto advanced towers. I was trying to make two different towers, and neither seems to work and I can't seem to find what i'm doing wrong. One of the towers is a 'chain lightning' tower, and the other is a 'frost nova' tower. Each does exactly what its named for. Please and thank you for your help if you happen to read/reply. Each looks so simple it can't be right.

  • Chain Tower
    • Events
      • Unit - A unit owned by Player 12 (Brown) Is attacked
    • Conditions
    • Actions
      • If ((Unit-type of (Attacking unit)) Equal to Chain Tower) then do (Unit - Order (Attacking unit) to Orc Far Seer - Chain Lightning (Attacked unit)) else do (Do nothing)

And the frost novas:
  • Nova
    • Events
      • Unit - A unit owned by Player 12 (Brown) Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Frost Nova Tower
    • Actions
      • Unit - Order (Attacking unit) to Undead Lich - Frost Nova (Attacked unit)

~DooM_AngeaL
 
Level 9
Joined
Jul 29, 2009
Messages
498
  • Chain Tower
    • Events
      • Unit - A unit owned by Player 12 (Brown) Is attacked
    • Conditions
    • Actions
      • If ((Unit-type of (Attacking unit)) Equal to Chain Tower) then do (Unit - Order (Attacking unit) to Orc Far Seer - Chain Lightning (Attacked unit)) else do (Do nothing)



i think thats the proplem lol
 
Level 5
Joined
Apr 17, 2010
Messages
124
  • Chain Tower
    • Events
      • Unit - A unit owned by Player 12 (Brown) Is attacked
    • Conditions
    • Actions
      • If ((Unit-type of (Attacking unit)) Equal to Chain Tower) then do (Unit - Order (Attacking unit) to [B]Orc Far Seer - Chain Lightning[/B] (Attacked unit)) else do (Do nothing)

[/trigger]


~DooM_AngeaL

i think thats the proplem lol[/QUOTE]

Whats the problem though? If Orc Far Seer - Chain Lightning? or what.
 
Level 31
Joined
May 3, 2008
Messages
3,154
It doesn't have to if your doing it by trigger i thought? Or am i worse then i say i am at triggering imo?

Your unit got to have that ability or else it would not work.

I test it by myself and it work perfectly fine when the unit have the ability.

Here.. I make 1 simple sample for you to see.

  • Melee Initialization
    • Events
      • Unit - A unit owned by Player 12 (Brown) Is attacked
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Attacking unit)) Equal to Chain Tower
        • Then - Actions
          • Unit - Create 1 Dummy for (Owner of (Attacking unit)) at (Position of (Attacking unit)) facing Default building facing degrees
          • Unit - Add Chain Lightning to (Last created unit)
          • Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Attacking unit)
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Attacking unit)) Equal to Frost Nova Tower
            • Then - Actions
              • Unit - Create 1 Footman for (Owner of (Attacking unit)) at (Position of (Attacking unit)) facing Default building facing degrees
              • Unit - Add Frost Nova to (Last created unit)
              • Unit - Order (Last created unit) to Undead Lich - Frost Nova (Attacking unit)
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
            • Else - Actions
This is the setup to be used if you do not wish the tower to have the chain lightning ability.

You got to remember a few thing.

1) This is just a sample trigger, I do not remove memory leak.
2) Dummy unit must be locust and invisible, they should not decay as this would leave corpse. A massive amount of corpse lead into instant lag.
3) Use damage sources instead of attacking unit, I forgot about damage sources. :p

I don't think I need to explain the difference between damage sources and attacking unit, do I? :p

If you do not wish to use dummy unit, just add the ability to the tower and use that trigger of yours.

or there is 3rd option, add ability to the attacking unit and order it to cast right away, then remove it right away.

Use "Damage Source". Attacking unit does not work with that event!

Using damage sources would not work either.. cause the attacking unit does not have the ability. :p
 
Status
Not open for further replies.
Top