• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[AI] Auto Attack

Status
Not open for further replies.
Level 2
Joined
Jul 3, 2007
Messages
17
isnt aggro the same thing?

computer players automatically attack the nearest enemy.

Not always. Sometimes a unit locks on an enemy unit and he tries to kill it first. But if that enemy unit is behind the line of other units, the attacker tries to circle around those units to reach his target. By the time he circles around them he gets hits from those units and dies before he reaches his target (or even he got in range if he is a ranged unit). It is annoying because if he could understand that he can never reach his target and then at least he would cancel that target and try to aim a closer enemy unit. Hence he would be able to pawn some enemy units before he dies.
 
Level 6
Joined
Mar 20, 2008
Messages
208
Not always. Sometimes a unit locks on an enemy unit and he tries to kill it first. But if that enemy unit is behind the line of other units, the attacker tries to circle around those units to reach his target. By the time he circles around them he gets hits from those units and dies before he reaches his target (or even he got in range if he is a ranged unit). It is annoying because if he could understand that he can never reach his target and then at least he would cancel that target and try to aim a closer enemy unit. Hence he would be able to pawn some enemy units before he dies.

Must say I never noticed that happening, I normally use a computer force or nuetral hostile.

Only time I've seen this happen was with actual players and poor micro.
 
Level 2
Joined
Jul 3, 2007
Messages
17
Must say I never noticed that happening, I normally use a computer force or nuetral hostile.

Only time I've seen this happen was with actual players and poor micro.

Well, while creating custom units and experimenting different combinations you may sometimes face such situations. Maybe giving melee skills to ranged units or vice-versa, modfiying priority value, etc. The World editor has many data fields. And there are lots of combinations you can experiment with. Of course in some cases units behave in unpredictable ways. When you add strange terrainings of map and odd ideas the creator has in his mind into this, of course weirdness may happen.

In fact I also need almost the same help the OP mentioned in my map. I didn't dig AI before so know little about. Also one of the things I wonder is if a unit changes his behaviour when a skill is added via trigger?..
 
Level 6
Joined
Mar 20, 2008
Messages
208
Well, while creating custom units and experimenting different combinations you may sometimes face such situations. Maybe giving melee skills to ranged units or vice-versa, modfiying priority value, etc. The World editor has many data fields. And there are lots of combinations you can experiment with. Of course in some cases units behave in unpredictable ways. When you add strange terrainings of map and odd ideas the creator has in his mind into this, of course weirdness may happen.

Then hes going to have to be a bit more descriptive of what he is doing.
 
Level 11
Joined
Nov 15, 2007
Messages
800
If units have very high priority or take an action which gives them higher priority they'll be targeted. Actions like repairing a structure = increase priority. Does your map actually need AI by the way? Because if you turn off default melee AI scripts units will ignore priority completely I believe. Also won't flee.
 
Well the map I'm working on right now is somewhat simple.
I need something that will have semi-smart control over a force of zombies.
Players build barricades and run around and such while shooting zombies.
What I want my map to do is have zombies that will have an acquisition range of a little over the sight of players. I need the zombies to understand that they cannot always reach a target and to attack the barricades. I also want zombies to attack a target that they hear shooting, but ONLY if they do not already have a target. I think this goes more in the category of trigger than it does AI, but I am not experienced in unit directing triggers.
Not only that but when I give a unit a command via triggers they will fulfill the command and then return to their original location. When I set the return range and time to ridiculous amounts it makes it so the will indeed reach the command point where ever it is but they still turn back.

In summary I need a way for zombies to recognize if they can reach a target or not.
A way to give zombies a target IFF they don't already have one. I don't want them to specifically attack the unit, but attack command where the unit was (This solves a lot of the problems, but if they find the marine and he shoots them they will circle his fort until they find a way in or die, they will not attack the barricades.)
 
raise the barricade's priority, or give the barricades the ability to harm the zombies in some way not visible to a user, then they will attack what threatens them and what is the closest.

for the IFF zombie has no target, i would think that would interfere with my above method, but if priorities are the right numbers, they might be smarter about things.
 
Level 6
Joined
Mar 20, 2008
Messages
208
Make the barricades owned by the player, they should start attacking them if they can not reach the player.

If you have the barricades ownership as nuetral passive, they will not attack.
 
Status
Not open for further replies.
Top