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

[General] Problem with AI

Status
Not open for further replies.
Level 22
Joined
Feb 3, 2009
Messages
3,292
Hello, so I made an AI for my map, it's going quite well until I found this horrible problem:

They AIs get a hero, they go and fight as they're supposed to for a while, but after some time they suddenly all want to reach their starting location which happens to be at a spot that they can't & must not reach.

Picture:


mphmobrpkr.png



So any ideas what I can do about this?

EDIT: After moving the start locations they still went there, so I guess they want to get to the taverns instead?
 
Last edited:
Level 14
Joined
Dec 12, 2009
Messages
1,027
You're not using the AI Editor for this, are you?

If the AI units (at least for all neutral ones) are created in that area and moved elsewhere, they will always attempt to return to their 'origin' spot. It has to do with the Creep - Guard Return Distance/Return Time [Sec], both can be edited/maxed out (100,000.1/10,000 respectively) under Gameplay Constants near the top of the menu. Note: changing these means you won't be able to retreat far enough away fast enough for hostile units to stop chasing you.

Try changing those to see if that fixes your problem.

//\\oo//\\
 
Level 22
Joined
Feb 3, 2009
Messages
3,292
I'm using both the trigger editor and triggers, the AIs are used for all computer controlled players.

Changing those is only for Natural Hostile, and even if it worked I can't use that because soon the entire map would follow one unit then.

I was suggested to use fully triggered AI, but I'm by far unable to do that.

Would it be possible to move his position where he's summoned in game?
 
Level 14
Joined
Dec 12, 2009
Messages
1,027
The heroes are spawning right outside of the taverns you selected them at, and trying to return there. Changing those constants should help part of the problem: them returning to wherever it is they were spawned at while being controlled by the triggers. The triggers can periodically order the heroes to attack other random locations to prevent everything chasing one unit the entire time (this works for the creep system in one of my maps).

Moving the start locations wouldn't change anything, the units are created outside of the tavern so that's where they'll return. To avoid this in another one of my maps, we triggered it so that a hero would be created at a particular point in the map area, and not at the tavern, so that it would have someplace to retreat to when it does occur. Just destroy the one created at the tavern and create a new one where you want.

//\\oo//\\
 
Level 20
Joined
Feb 24, 2009
Messages
2,999
There's nothing wrong with using the AI Editor it works perfectly fine and just as Blizzard intended, it's using it for things like this (i.e. custom maps) that makes it look bad, because quite frankly it wasn't designed with them in mind.

Creep - Guard Return Distance/Return Time [Sec] - Would suggest you have the heroes classified as creeps or something, can't you just declassify them? Normal heroes don't run to their altar every x in melee games, so this is obviously a fixable problem.

You have got 'Can Flee' set to false in the object editor, right as that could be one explanation?
 
Level 20
Joined
Feb 24, 2009
Messages
2,999
First of all edit that, if it fixes the problem great!
If it doesn't return to it's default value and set flee as false for half the heroes, test - if half display the problem, you've found your solution if all still run, set them all back to true again and start from square 1 ^^
 
Level 14
Joined
Dec 12, 2009
Messages
1,027
Normal heroes don't run to their altar every x in melee games, so this is obviously a fixable problem.


No, but the entire army does gather at a point (usually at the Start Location) between attacking. The only difference here is that the army consists of one unit, which may or may not attack like armies seen in melee games. Like you said, the AI Editor is designed with melee-type games in mind (attacking/defending locations) - not arenas (attacking heroes/defending your hero).

@Ironside: It appears you're going to have to get the AI fully triggered to behave the way you want it to. The AI Editor may be part of your problem, since moving the start locations and editing constants don't have any effect.

//\\oo//\\
 
Status
Not open for further replies.
Top