• 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.

How to make a unit being agressive?

Status
Not open for further replies.
Level 4
Joined
May 17, 2011
Messages
106
Hello!

I'm making a survivor type map and I'm wondering what I could do to make them being more agressive? I increased the acquisition range and the visions of my units owned by computer 12 (brown) but sometimes they just come around the player's bases and just..like.. don't care and won't attack. Sometimes, they flee even if I removed the option in the object editor.

I don't want them to directly choose a player and attack it when they spawn, but I would like them to be more of a challenge.

Any ideas?

Oh and if someone could tell me a way to make my workers construct building while being OUTSIDE of the constructing building instead of INSIDE that would be great :)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
Oh and if someone could tell me a way to make my workers construct building while being OUTSIDE of the constructing building instead of INSIDE that would be great :)
Change the race.

Orc and Nightelf buildings are built internally. Ancient buildings consume the worker upon completion. Undead buildings are warped in (auto build). Human buildings are built like typical RTS buildings from games like Age of Empires or Empire Earth (worker stands next to and hammers away).

I don't want them to directly choose a player and attack it when they spawn, but I would like them to be more of a challenge.
Give them some form of scripted AI that wanders between major areas randomly (you choose the major areas). Extend their aquisition range just enough that they will attack everything within an area (so no safe zones). Obviously attack move between areas.

Be aware that the AI will pioritise some units over others. An example is melee combat units rushing to kill a tower (attacking combat unit so high piority) and completly ignoring the wall which protects the tower (passive unit not capable of fighting so low piority).
 
Level 4
Joined
May 17, 2011
Messages
106
So I made them move to random point of the map when they spawn and greatly increased their acquisition range and it feels more challenging but I got another problem. Apparently, when a player block his base (wall his entrance completly) units would just stop attacking. (I guess that since they can't attack towers they just try to find another way in and get stuck in the trees or something...

I'd like them to directly attack walls if they can't attack towers... is there an easy way to do this? I'd like to not make any big AI script since I never touched the AI editor...

Oh and by the way, does anyone know how to disable the base wc3 ambient sound? I've tried stop ambient sound, stop music etc, but it wouldn't work at all.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
I'd like them to directly attack walls if they can't attack towers... is there an easy way to do this? I'd like to not make any big AI script since I never touched the AI editor...
I do not think this is possible directly.

The only way I know is to design all bases so that they are exposed enough that monsters get caught against walls when moving into them and the walls have an attack/deal damage so generate the same agro as towers.
 
Level 4
Joined
May 17, 2011
Messages
106
Would that be possible with a spiked barricade effect on walls? I've been trying to add such upgrade to my walls but for some reason it won't work...

Have you ever played Jurassic Park EE by SamMm ? I would usually use bunkers to block my base and dinosaurs can't get through but they still manage to attack them even if they don't have any kind of attack damage except for its spiked barricade..
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
Have you ever played Jurassic Park EE by SamMm ? I would usually use bunkers to block my base and dinosaurs can't get through but they still manage to attack them even if they don't have any kind of attack damage except for its spiked barricade..
If they attack move to the player and enocounter units along the way they will attack. The problems arrise if the pathing causes the units to get stuck against natural walls (like cliffs) with no targetable unit is aquisition range or are being shot at by towers when blocked by a wall.

Something like spiked baracaded ability probably causes enough agro that they will actually attack the walls.

This is a common problem in vampirisim maps where unless a player activly orders their hero to attack the blocking walls, he will just walk around indefinatly trying to attack a tower that is behind the walls and eventually get killed if he just uses the attack move order.
 
Level 4
Joined
May 17, 2011
Messages
106
Added the skill spiked carapace to my walls and it works just fine. Now units will attack walls if they can't touch towers.

I still have one problem left though, units will only attack me once one of them discovered my base so if it takes 20 minutes for them to find me I won't get attacked for that time...

I already got their sight to the maximum (1800)
 
I just want to add in that giving the "wander" ability to your enemies will cause them to roam around (like critters do). This could be a nice way to get them moving a little.

I think the whole deal with aquisition range is a poor solution, better to put it at something realistic and then have a script move them towards you in cases.

One thing you could make is to have a periodic timer, and everytime it fires, you pick 15 random enemies, and if (random integer between 0 and 100) is less than, say, 75 (or whatever chance you want for it), theese units will attack-move towards the location of your unit. If you don't want them to find your exact location at the first try, just order them to attack move to a polar point from your units location with a distance of (random real between 0 and 1000) and an angle of (random real between 0 and 360).
 
Status
Not open for further replies.
Top