• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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