"Damaging unit" isn't good choice because if damaging unit is behind big group of units AI tries to attack it. Best example is Siege tank in Siege Mode - AI tries to attack against Siege Tank ignoring all other units.
Any idea how to improve this trigger? Campaign AI doesn't defend bases so I'm trying to create trigger that orders units to defend.
If you have some better solution I can remake whole trigger. I'm not sure is "damaging effect" event best choice.
Improved version of trigger that works better at least. I changed attack target from "Damaging unit" to " Units In Region With Alliance To Player" using region. You can use "entire map" as region too but it causes all units to attack into player's base. Thats why its better to use region. I did some testing and this seems to work like "attack move".
I also changed "Suggest AI order" to "Issue order".
For some reason this trigger causes AI not to send attack waves normally after this trigger has run at least once. Maybe AI counts units that tried to defend as active units or something like that and don't add any of them to attack waves?
It sounds like you're trying to make a melee map correct?
All you have to do is make sure you either have started AI or init melee AI triggers for computer players if that's the case.
There are attack and defense wave functions under the AI trigger label, but it sounds like you have to use campaign AI for those to work. I don't think you can have both melee and campaign AI on at the same time.
I would change the location of their attack. Order then to attack the position of the damage. Do not order them to attack the damaging unit- instead, order them to attack the position of the damaging unit.
Rollback Post to RevisionRollBack
Feel free to Send me a PM if you have any questions/concerns!
I'd like to point out that these triggers are, for lack of a better word, retarded.
Firstly, they will trigger insanely frequently during an attack. A marine attacks 70 times per minute. 12 marines; 14 triggers per second.
Secondly, attacking from more than 1 point will cause the defending units to behave... erratically. All it takes is a single banshee at the other side of the AI's base to break this trigger.
I can't suggest an alternative without knowing more about the map, but I definitely wouldn't go with this solution.
Eiviyn, I agree totally. That trigger launches too often. It actually lauches when any unit takes damage :(
What I'm trying to do is just generic AI that sends units to defend buildings when someone attacks them. Campaign AI doesn't care if there are units attacking on other side of base, all units are just standing.
It is retarted too that that if only 1 unit is attacking on some building AI sends all units to defend.
It will be AI that I want to use on campaign maps, so yes "melee AI". I added "cooldown" for trigger by turning current trigger off, wait 5 sec, turn current trigger on.
I have created trigger that sends all units in AI players to defend against attackers.
There is one problem with Zerg players: AI sends all Overlords too. How to prevent that?
I realized a problem with this trigger.
"Damaging unit" isn't good choice because if damaging unit is behind big group of units AI tries to attack it. Best example is Siege tank in Siege Mode - AI tries to attack against Siege Tank ignoring all other units.
Any idea how to improve this trigger? Campaign AI doesn't defend bases so I'm trying to create trigger that orders units to defend.
If you have some better solution I can remake whole trigger. I'm not sure is "damaging effect" event best choice.
attack move to the position of the attacking unit
Your idea is right.
Problem 1) I can't find "attack move". Isn't attack targeting ground (Point technically) same this as attack move?
Problem 2) How to do that "Position of attacking unit" part?
I'm was thinking solution that moves a point to position of attacking unit and use "attack move" to this point.
New version on trigger:
This trigger works... well... somehow. Units start to attack but when they get near attacker they turn around or just act stupidly.
Maybe some kind of attack wave solution works better?
Improved version of trigger that works better at least. I changed attack target from "Damaging unit" to " Units In Region With Alliance To Player" using region. You can use "entire map" as region too but it causes all units to attack into player's base. Thats why its better to use region. I did some testing and this seems to work like "attack move".
I also changed "Suggest AI order" to "Issue order".
Still some problem with this trigger :(
For some reason this trigger causes AI not to send attack waves normally after this trigger has run at least once. Maybe AI counts units that tried to defend as active units or something like that and don't add any of them to attack waves?
Any idea what causes this exactly?
It sounds like you're trying to make a melee map correct? All you have to do is make sure you either have started AI or init melee AI triggers for computer players if that's the case.
There are attack and defense wave functions under the AI trigger label, but it sounds like you have to use campaign AI for those to work. I don't think you can have both melee and campaign AI on at the same time.
Welcome to sc2mapster bobfatso.
I already know how to send attack waves but that "defend base" trigger causes a problem with attack wave sending. I'm using campaign AI.
@bobfatso: Go
Welcome to sc2mapster! Feel free to send me a PM if you need anything or have any questions ;)
@Terhonator: Go
I would change the location of their attack. Order then to attack the position of the damage. Do not order them to attack the damaging unit- instead, order them to attack the position of the damaging unit.
Thanks zeldarules28!
"Position of damaging unit" works best.
I also found solution for attack wave problem. Using "Issue AI Order" works better with attack waves. "Issue order" messed attack waves.
I don't put [SOLVED] tag yet... I do some more testing tomorrow and make sure that everything works just as I wanted ;)
Test map added.
I'd like to point out that these triggers are, for lack of a better word, retarded.
Firstly, they will trigger insanely frequently during an attack. A marine attacks 70 times per minute. 12 marines; 14 triggers per second.
Secondly, attacking from more than 1 point will cause the defending units to behave... erratically. All it takes is a single banshee at the other side of the AI's base to break this trigger.
I can't suggest an alternative without knowing more about the map, but I definitely wouldn't go with this solution.
Eiviyn, I agree totally. That trigger launches too often. It actually lauches when any unit takes damage :(
What I'm trying to do is just generic AI that sends units to defend buildings when someone attacks them. Campaign AI doesn't care if there are units attacking on other side of base, all units are just standing.
It is retarted too that that if only 1 unit is attacking on some building AI sends all units to defend.
All kind of improvement tips are welcome.
Is it a competitive melee AI or a cheating AI? If the latter, I have plenty of suggestions.
It will be AI that I want to use on campaign maps, so yes "melee AI". I added "cooldown" for trigger by turning current trigger off, wait 5 sec, turn current trigger on.
@terhonator86, i tried using AI - suggests order, but it still messes my attack waves. how did you resolve this?