I'm working on a defense map where you must build walls to form a base. The walls are structures so you must stack them up next to each other in order to create the base. The problem is, turrets are created behind these walls. Now instead of the enemy trying to kill what's attacking them, they're more concerned about what's reachable and close.
To make it simple, instead of breaking a tunnel through the walls to reach the turrets, they rather kill all the walls in their radius. So while the enemy could have just destroyed 2 walls to reach the turret, he ends up killing 6 or more.
Something tells me this has something to do with the AI. Maybe something I didn't check in the Data Editor? I've even tried to mess with the Priority of the units, still no luck.
You can make walls invincible and they wont get bothered by the AI. Or use a trigger.
event- unit is attacked
condition-
or
{
attacking unit = tower1
attacking unit = tower2
attacking unit = tower3
etc
}
actions: issue order to attacked unit to attack attacking unit
attackED or attackER are not real names you can use in the triggers Im just showing you waht I mena. I believe triggering unit and attacking unit will be the ones you use.
This trigger will order any unit hit by a tower attack to immediately run towards the power and attack it, ignoring everything else. =] hope this helps
Rollback Post to RevisionRollBack
Feel free to Send me a PM if you have any questions/concerns!
I do want the walls to be attack, however I want them to be attacked logically. For example, instead of attacking all the walls around the turrets. I want them to form one tunnel through the wall so they could reach the turrets.
What your trigger did was make the enemy not even attack. It's order got reseted each time it was attacked by a turrent. In addition, it couldn't attack it's target because it was blocked by the walls which it should be attacking in order to reach the targeted turret I assigned it to. Any other suggestions?
Simply, I want the enemy to kill whatever attacks them, even if they have to kill everything that's blocking them from attacking the target.
oh.. know this one, In the data editor. under the unit:
Combat - Attack Target Priority
the higher the number the more units will focus on it. make it lower in the wall unit and the enemy's make a hole in the wall and should attack the towers
Tried it, set the wall priority to 0 and the turret to 100. The melee units will still act stupid because of the structures that are blocking the turrets.
You could turn on the flag AI Always a Threat in the unit thing. It makes the AI always target over any other unit, like medivacs. But I dunno for sure if this fixes your problem.
You could turn on the flag AI Always a Threat in the unit thing. It makes the AI always target over any other unit, like medivacs. But I dunno for sure if this fixes your problem.
Is it only a problem when there is no pathing route for the attacking units to reach the attacking turret?
Correct, I know it may sound self explanatory, but you'd at least think they'd kill the structures in front of the turret just so they can take a swing at it. Yet, what it seems like is that the enemy ignores the fact that it's even being attacked. That's some strange AI in my opinion...
Where # is a wall and T is a turret. You need the second layer of walls to have a higher priority than the first layer of walls. That way, when the enemy gets the chance, it will prioritize the second layer. Then make the turrets have an even higher priority so it will prioritize the turrets over the second layer.
Where # is a wall and T is a turret. You need the second layer of walls to have a higher priority than the first layer of walls. That way, when the enemy gets the chance, it will prioritize the second layer. Then make the turrets have an even higher priority so it will prioritize the turrets over the second layer.
Sounds good but the problem is that the players will be creating the same structure for both layers of the walls.
If you can change the priority via triggers (I can't check here), you can do what TrenixPL says.
On create unit change the priority to 1000 - distance to point (base) or whatever number works. You can make the turrets double that valour too (1000 - distance to point (base)) * 2. That way probably will work.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I'm working on a defense map where you must build walls to form a base. The walls are structures so you must stack them up next to each other in order to create the base. The problem is, turrets are created behind these walls. Now instead of the enemy trying to kill what's attacking them, they're more concerned about what's reachable and close.
To make it simple, instead of breaking a tunnel through the walls to reach the turrets, they rather kill all the walls in their radius. So while the enemy could have just destroyed 2 walls to reach the turret, he ends up killing 6 or more.
Something tells me this has something to do with the AI. Maybe something I didn't check in the Data Editor? I've even tried to mess with the Priority of the units, still no luck.
You can make walls invincible and they wont get bothered by the AI. Or use a trigger.
event- unit is attacked condition- or { attacking unit = tower1 attacking unit = tower2 attacking unit = tower3 etc }
actions: issue order to attacked unit to attack attacking unit
attackED or attackER are not real names you can use in the triggers Im just showing you waht I mena. I believe triggering unit and attacking unit will be the ones you use.
This trigger will order any unit hit by a tower attack to immediately run towards the power and attack it, ignoring everything else. =] hope this helps
@zeldarules28: Go
I do want the walls to be attack, however I want them to be attacked logically. For example, instead of attacking all the walls around the turrets. I want them to form one tunnel through the wall so they could reach the turrets.
What your trigger did was make the enemy not even attack. It's order got reseted each time it was attacked by a turrent. In addition, it couldn't attack it's target because it was blocked by the walls which it should be attacking in order to reach the targeted turret I assigned it to. Any other suggestions?
Simply, I want the enemy to kill whatever attacks them, even if they have to kill everything that's blocking them from attacking the target.
Please help.. =\
It might be related to the target priority values on your actual wall units.
From my understanding the ai sorts through the most valuable target to kill and kills them.
oh.. know this one, In the data editor. under the unit:
Combat - Attack Target Priority
the higher the number the more units will focus on it. make it lower in the wall unit and the enemy's make a hole in the wall and should attack the towers
Tried it, set the wall priority to 0 and the turret to 100. The melee units will still act stupid because of the structures that are blocking the turrets.
You could turn on the flag AI Always a Threat in the unit thing. It makes the AI always target over any other unit, like medivacs. But I dunno for sure if this fixes your problem.
Is it only a problem when there is no pathing route for the attacking units to reach the attacking turret?
Still the same thing.
Correct, I know it may sound self explanatory, but you'd at least think they'd kill the structures in front of the turret just so they can take a swing at it. Yet, what it seems like is that the enemy ignores the fact that it's even being attacked. That's some strange AI in my opinion...
Guess there isnt a solution.. =\
@TrenixPL: Go
Assuming your setup is something like this:
Enemies -> # # T
Where # is a wall and T is a turret. You need the second layer of walls to have a higher priority than the first layer of walls. That way, when the enemy gets the chance, it will prioritize the second layer. Then make the turrets have an even higher priority so it will prioritize the turrets over the second layer.
Sounds good but the problem is that the players will be creating the same structure for both layers of the walls.
@TrenixPL: Go
If you can change the priority via triggers (I can't check here), you can do what TrenixPL says.
On create unit change the priority to 1000 - distance to point (base) or whatever number works. You can make the turrets double that valour too (1000 - distance to point (base)) * 2. That way probably will work.