• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Need some help ( Units are not atacking the buildings if buildings block path)

Status
Not open for further replies.
Level 31
Joined
Aug 6, 2015
Messages
640
Hello everyone, so guys i got a problem, if i block path to my soldiers or base with buildings in my map, the enemy waves(units) are not atacking the walls, can someone help me to solve this problem please?
here are the map, with same triggers that are in my map
 

Attachments

  • TestSystem.w3x
    19.1 KB · Views: 44

Deleted member 242951

D

Deleted member 242951

Are you sure that the owner of the walls is an enemy player ?
 
Level 18
Joined
Jun 15, 2012
Messages
498
Don't know how to solve it, seems an aggro problem.
Noticed that if nothing is attacking them, the spiders will attack the closer/higher priority target, but is they are being attacked by any units, they will try to fight back ignoring the buildings
 
Level 12
Joined
May 22, 2015
Messages
1,051
Don't know how to solve it, seems an aggro problem.
Noticed that if nothing is attacking them, the spiders will attack the closer/higher priority target, but is they are being attacked by any units, they will try to fight back ignoring the buildings

Do the buildings attack?

I was messing around with something at some point, and it turns out that units with fortified armour have lower priority than units with other types of armour. I don't know if it will work, but try making the buildings have a different kind of armour type. You can change the tooltips and stuff to match fortified later if you want.
 
Level 31
Joined
Aug 6, 2015
Messages
640
Do the buildings attack?

I was messing around with something at some point, and it turns out that units with fortified armour have lower priority than units with other types of armour. I don't know if it will work, but try making the buildings have a different kind of armour type. You can change the tooltips and stuff to match fortified later if you want.

tried to change type of armor, not workin

Are you sure that the owner of the walls is an enemy player ?

what u mean?
 
Level 11
Joined
Jun 2, 2013
Messages
613
It could have something to do with vision/range/acquisition range. I know that if you have archers on a ledge in standard melee which has vision below, but the enemy units have no vision of the ledge and there is no direct path to the archers, the AI get's dumb.

What you could try, is giving the walls an ability hidden into a disabled spellbook that doesn't show an effect and deals 0 damage. (such as Immolation or Phoenix fire). That should generate the threat to cause them to attack the Buildings.

I'm also not sure if you can just increase the buildings priority or not to see if that helps.
 
Level 31
Joined
Aug 6, 2015
Messages
640
It could have something to do with vision/range/acquisition range. I know that if you have archers on a ledge in standard melee which has vision below, but the enemy units have no vision of the ledge and there is no direct path to the archers, the AI get's dumb.

What you could try, is giving the walls an ability hidden into a disabled spellbook that doesn't show an effect and deals 0 damage. (such as Immolation or Phoenix fire). That should generate the threat to cause them to attack the Buildings.

I'm also not sure if you can just increase the buildings priority or not to see if that helps.

not workin :(
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
Common building agro problem. The reflexive (not computer controlled, possibly only neutral or no controller) tactical AI of units is such that if it is under attack by combat units it will ignore all buildings (especially without attack). Your Farm units cannot attack hence they are ignored as the AI tries to reach the attackers behind them. Giving them attack solves part of the problem but nowhere near all (they will give off the odd attack but otherwise still dance around). I guess it assigns buildings a near 0 priority in this tactical AI so any unit nearby will be targeted instead unless completely blocked (cannot move) in which case it will attack buildings with attacks.

The solution is simple. Instead of giving them to no controller, give them to a computer player controller. Even with no running AI script (just the slot set to computer) the computer player tactical AI is far superior to the reflexive tactical AI no controller uses. The computer tactical AI will have no problem attacking your farms to reach the units behind them. Even with riflemen firing on them they will waste no time ripping those farms down.

If you test the attached map the now computer controlled spiders will rush straight at the farms damaging them heavily until eventually they fall and all your units die.
 

Attachments

  • MadMax - TestSystem.w3x
    19.9 KB · Views: 32
Level 31
Joined
Aug 6, 2015
Messages
640
Common building agro problem. The reflexive (not computer controlled, possibly only neutral or no controller) tactical AI of units is such that if it is under attack by combat units it will ignore all buildings (especially without attack). Your Farm units cannot attack hence they are ignored as the AI tries to reach the attackers behind them. Giving them attack solves part of the problem but nowhere near all (they will give off the odd attack but otherwise still dance around). I guess it assigns buildings a near 0 priority in this tactical AI so any unit nearby will be targeted instead unless completely blocked (cannot move) in which case it will attack buildings with attacks.

The solution is simple. Instead of giving them to no controller, give them to a computer player controller. Even with no running AI script (just the slot set to computer) the computer player tactical AI is far superior to the reflexive tactical AI no controller uses. The computer tactical AI will have no problem attacking your farms to reach the units behind them. Even with riflemen firing on them they will waste no time ripping those farms down.

If you test the attached map the now computer controlled spiders will rush straight at the farms damaging them heavily until eventually they fall and all your units die.

thanks mate
but now i got an other problem, u see if i don't put any ai player when i start map, the units won't atack, can i somehow turn on ai option for an empty player? ( in my case for owner of atacking units )
 
Last edited:
Level 11
Joined
Jun 2, 2013
Messages
613
Not sure if this is your new question or not but...
If you mean add a computer player to your map, you go to Scenario -> Player Properties

Go to Player 12 Brown and change it from None -> Computer

Then go to Force Properties and add a new Force. Move Your Computer player to Force 2.
In force Settings check mark "custom forces" and "fixed player settings".


attachment.php


attachment.php
 

Attachments

  • Capture1.PNG
    Capture1.PNG
    90.4 KB · Views: 140
  • Capture2.PNG
    Capture2.PNG
    70.9 KB · Views: 153

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
thanks mate
but now i got an other problem, u see if i don't put any ai player when i start map, the units won't atack, can i somehow turn on ai option for an empty player? ( in my case for owner of atacking units )
Just posting to back up what PublishedShadow has put above. That is how you do it so that the slot always has a computer in it when you create a lobby.

Do note that hosting robots can still manipulate such slots to closed or even human controllers. If the map is multiplayer consider adding a test for such a case and then ending the game early after a warning.

Also GUI Players 13-16 (neutrals) cannot have their controller modified in the way above. They should generally only be used if you really have to or for units where the reflexive tactical AI is fine for use.
 
Level 31
Joined
Aug 6, 2015
Messages
640
so its workin now, but still problems
1st. in my map i got simple melee ai, and at begining of the game, i init ai with triggers(standard melee ai initialization) , and here the problems apear, the ai that controls the waves(in my case brown) is moving all his army to his starting position.. around gold mines instead of leav them to atack my units.
2st. if i got more army he is starting to run with waves away..
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
1st. in my map i got simple melee ai, and at begining of the game, i init ai with triggers(standard melee ai initialization) , and here the problems apear, the ai that controls the waves(in my case brown) is moving all his army to his starting position.. around gold mines instead of leav them to atack my units.
Either add the units to be excluded by the AI (so will not be touched) or do not start melee AI for the player. As my example map showed, they do not need running AI to have better tactical AI.

2st. if i got more army he is starting to run with waves away..
Do not use Melee AI for moving the units. If you need AI to build then you need to remove the units from AI control and use triggers instead. The AI runs if it knows it cannot win to try and minimize losses. This is exactly what humans would do (to get more troops) but it can ruin the fun of a map when an AI charges you with a death wave comprised of far too many units at once.

In SC2 you can order AI to "Suicide" units in which case they will attack and never retreat until all enemies are dead or the unit dies. I am unsure if WC3 has such a feature.
 
Level 31
Joined
Aug 6, 2015
Messages
640
Either add the units to be excluded by the AI (so will not be touched) or do not start melee AI for the player. As my example map showed, they do not need running AI to have better tactical AI.


Do not use Melee AI for moving the units. If you need AI to build then you need to remove the units from AI control and use triggers instead. The AI runs if it knows it cannot win to try and minimize losses. This is exactly what humans would do (to get more troops) but it can ruin the fun of a map when an AI charges you with a death wave comprised of far too many units at once.

In SC2 you can order AI to "Suicide" units in which case they will attack and never retreat until all enemies are dead or the unit dies. I am unsure if WC3 has such a feature.

how do i do that "Either add the units to be excluded by the AI"
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
You need to give the wall a source of damage. Permanent immolation with 0.01 damage worked for me in the past.
It does not work for no controller? I tried that with an attack and the units still walked around mostly. On the other hand making the controller "Computer" even with no AI meant they attacked the wall no problem even if the wall had no attack.

No controller AI seems to ignore buildings unless it is only the building left (no combat units in range).
 
Status
Not open for further replies.
Top