Attacking a different unit each attack.

Hildagarn

Member
Reaction score
20
In my Td I would like my poison towers to attack a different unit each attack. this ability was available in XPTD, but that map does not work anymore due to patches.

Is this possible to have as a toggling thing?
 

the_ideal

user title
Reaction score
61
Here's what I would try (freehanded):

Make a trigger like this:

Event - Unit is attacked
Condition - Unit-type of attacking unit equal to poison tower
- Triggering unit has buff: poison equal to true
Action -
Pick random 1 unit from unitgroup: units within 700 of (attacking unit) matching (matching unit) has buff: poison equal to false and do actions:
order (attacking unit) to attack (picked unit)

If that doesn't make sense just post again and I'll try to explain more.
 

Setharoth114

New Member
Reaction score
5
It would be Issue order targeting a unit. The action would look like this:

Order (attacking unit) to attack random unit from unit group (units within 700 of (attacking unit) matching (matching unit) has buff - poision equal to false.
 

Hildagarn

Member
Reaction score
20
hmmm this is my trigger and it still odesnt seem to work
Trigger:
  • Poison Assassin
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Toxic Assassin
      • ((Triggering unit) has buff Slow Poison (Stacking)) Equal to True
    • Actions
      • Unit - Order (Attacking unit) to Attack (Random unit from (Units within 500.00 of (Position of (Attacking unit)) matching (((Matching unit) has buff Slow Poison (Stacking)) Equal to False)))
 

Setharoth114

New Member
Reaction score
5
Hm, you could also try to remove [((Triggering unit) has buff] from the conditions and then just do order (attacking unit to Attack (random unit from (units within 500 of (Posistion of (Attacking unit)). There would be some times when it would target the same unit again, but oh well.

If that STILL doesn't work, then the problem is that the attacking unit is issuing too many orders at once for it to finish an attack. If thats the case, add in these events:
Turn off (This trigger)
Wait 0.3 seconds
Turn on (This trigger)
 

Hildagarn

Member
Reaction score
20
lol well i took off the second condition and it seems to sort of work, but the unit has no attack animation when it attacks a different unit. why does it do that?
 

Setharoth114

New Member
Reaction score
5
I dunno, what model are you using? Warden?
The problem is probally, once again, that its recieving orders to fast to finish its attack animation. The turn off, wait, turn on might help, though I think that will bug a bit when you have more then one tower attacking. Maybe just try a different model that doesn't have much of an attack animation, like a building.
 

Setharoth114

New Member
Reaction score
5
I made something like this before in a TD map, so I know it works, just give me a sec to check... gotta find that old map...

Okay, the trigger on mine goes as follows:
Events - A unit owned by Player 10 Light Blue is attacked.
Conditions - Unit-Type of Attacking Unit equal to Cold Bolt Tower equal to true
Unit - Order (Attacking unit) to Attack (Random unit from (Units within 700.00 of (Position of (Attacking unit)) matching ((Owner of (Matching unit)) Equal to Player 10 (Light Blue))))

Because I was just using a human cannon tower as the model, it had no attack animation and hence no problem in that direction.

Edit: It might be possible to change values in the Art part of the Object Editor in order to reduce the animation speed, but I have never messed around with it before, but you might as well try it.
 

meOme

New Member
Reaction score
31
Or you could just use the ability Phoenix Fire instead of triggers and change the animation to something poisonish.
 
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