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

JASS Campaign AI - pathing problem / too long distance

Level 19
Joined
Apr 20, 2014
Messages
619
Hi,

I noticed a strange behavior with some Campaign AI scripts I made. They work fine and properly, no issues there, except when there is too long of a walking distance to their target.

In my map, there are 3 AI players (+1 human player) vs 6 AI players battling each other. But it seems that there is too long of a walking distance for one of the AI players. In the end, only two bases remain: top left (enemies) against bottom right, bottom left, and top right (allies).

They no longer attack each other unless the enemy gets closer. The enemy will attack the human player because the player is within range, but then, the allies will also attack as the enemy comes closer. However, that’s all that happens — they don’t engage otherwise.

I’ve noticed this issue on another map too: two AI bases were "quite close" from a bird's-eye view, but the walking distance was quite large. They only attacked each other when I provided zeppelins.

Does anyone have an idea how to increase the attack distance or get the AI to engage over longer distances? Providing zeppelins isn't the solution I'm looking for.
 

You could try implementing the attack functions as laid out here by InsaneMonster in JASS 2.0 I think he's re-wrote the functions to make the AI function a little better in terms of attacking.
 
Level 19
Joined
Apr 20, 2014
Messages
619
This looks quite complex, uh. I will give it a check. Too bad last replies say that it needs to be fixed.


Well, meanwhile I did a test:
I made a big map 288x288, two bases top left corner and bottom right corner. They send every 60 seconds a wave against each other.
  • Map is empty (flat terrain, no doodads). They properly attack themselves.
  • I added obstacles (simple upper level terrain) middle so they have to go from corners... and the map crashed with no error...
1730239984079.png

Anyone have ever heard of that...?
 
Top