| 03-22-2009, 10:18 PM | #1 |
I have an issue with computer controlled units running toward their start location after being spawned via triggers. If a nearby allied unit is in combat or under attack their priority is to run and help, which is great, but if no nearby allies are in combat the spawned computer units run toward their start location. The spawning occurs within enclosed areas that have no path out. Regardless, if they and their allies are left unattacked the computer runs straight against the wall pointed toward their start location on the map. I'm running melee AI scripts for computer players in order to get them to use spells, but their is no town hall, worker units, or anything else at their start location. The reason why they would want to run to the start location alludes me. They have no other units on the map aside from the ones spawned within the enclosed area. I've tried placing their start location at the center of the enclosed area, which seems to work well, but I'm using a sequence of these enclosed areas and therefore the problem occurs in others even if solved in the first by leaving the start location centered and accessible to them. Computer controlled units have huge acquisition ranges and the goal is to get them to attack the player controlled Hero within the enclosed area, regardless of where he is. Aside from computer units running with themselves pointed at their start location when not in combat, this works fine. |
| 03-22-2009, 10:46 PM | #2 |
This happens because the melee AI has a command to all fighters it owns to form an army or return in mass to the hometown if they don't have any duty to perform (like attacking someone). So you can try to: - Create a custom AI (with the 3rd window empty and some checks disabled in the 1st window should work fine, probably) Or - (Don't know if it works) Move the starting point outside the map offset. Or - Move the starting point in the place the units are (think about it, they'll act (except for helping the allies) like creeps, they'll fight then return to their normal location... if they're alive, of course XD) |
| 03-22-2009, 11:14 PM | #3 |
Unfortunately your third option won't work for me. I plan on having 16ish enclosed areas, all similar to the one I originally described (players are teleported to them in sequence), so I won't have an equal number of computer players and their start locations to allocate to each one. Moving the starting point outside the map boundaries, sadly, did not work. But in regards to the AI editor, I haven't done much within it so I don't understand exactly what you mean by leaving the 3rd window empty. Slightly off topic, but also a bit of a problem, does anyone know how to remove, or if it's possible to remove, the art from the life regeneration aura? It doesn't seem to have any buffs or art attached to the spell, but I find the sparkling yellow and green streams distracting. |
| 03-22-2009, 11:22 PM | #4 | ||
Quote:
Quote:
|
| 03-22-2009, 11:59 PM | #5 |
Well, there are seven custom Heroes to choose from and potentially four players in any one of the enclosed areas at once. I'd prefer to make this as simple as possible. What if I created a modified town hall, invisible with no collision, at the center of these rooms? Would they gravitate to the town hall or still toward their empty start location? Life regeneration aura has no buff within the editor, seemingly. The poison info thing won't work because there's no standard buff to revert to. It's like the animation is hardcoded or something. This is less of an issue, however, as its a minor aesthetic thing. |
| 03-23-2009, 12:09 AM | #6 | |
Quote:
This depends on a condition in the AI settings that lets the AI change its town to another if the main one is destroyed or simply doesn't exist (and so the position of the unused armies), as I've seen from melee plays it seems that this option is disabled in melee AI, but it's worth trying anyway... However, it seems to me that I could handle something like this AI if you need it, but the computer won't choose from more than 3 heroes... (well, unless I create 3 or more sets of AI with the only change of the hero selection and then you make some "random integer" trigger to make the game choose for one or another...) |
