• 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] Neutral AI Imune Buildings

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
In a map im making I use neutral players as creeps to attack players since I want all 12 slots being people.
The system I made works fine but for 1 small problem.
They dont attack buildings that are not doing anything. They attack units, heros, and even seige weapons but do not attack buildings. They just stand around the building and might, when it produces something, cause 1 or 2 to start attacking the building but thats a 1 in 10 chance. But still mostly they stand around or walk past buildings although they belong to an enemy and they can definatly hit buildings.

So you know I have made sure that the AI are enemies to the player and the units can hit the buildings and that they move by "attack" not "smart" or "move".

This is realy anoying since the main reason I put them in was to kill buildings if your badly defended.
I have tried with both neutral hostile and neutral victim players but they both have the same bug.

Anyone have any ideas to go round this? (make them attack buildings).

<NOTE> I dont want to make a Computer player since i want 12 players.
 
Level 22
Joined
Jan 10, 2005
Messages
3,426
i didnt put the real code, but i think u will understand

Events: Unit comes withing XXX range of a unit
Conditions: 1) that unit is a building = true 2) entering unit is owned by 'neutral hostile i think'
Actions:
If: units within XXX range (matching condition => they arent a building) = 0
Then: Order triggering unit to attack that building
Else: Do Nothing
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
That method will hardly be effictve.
1. It will lag alot considering the number of buildings my map will have.
2. It will make the AI focous on buildings.
3. I already know its possiable with JASS triggers but I want to know can it be fixed without triggers.

I think by making a dumy aura based on imolation or unholy aura will cause them to attack the buildings.
 
Status
Not open for further replies.
Top