HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

AI Help Please!

06-29-2010, 03:53 AM#1
Monster_Penguin
I have, throughout my Wc3 Editor experience, stayed away from the AI Editor up until now, I did some research on it in the forums and hope I can get some help with what I am trying to do.
I'm trying to make a cooperative play mode in a project I'm working on where the players fight against an invading force. I want the computer player to be smart enough to attack their bases. I first started out using basic triggers but the results with the attack order trigger I made did not work.
Attack Trigger (Converted to Text.)
Events
Unit - A unit enters Region <gen>
Conditions
(Owner of (Entering unit)) Equal to Player 12 (Brown)
Actions
Unit - Order (Entering unit) to Patrol To (Position of (Random unit from Unit_Group)
I figured that if I used the patrol command with the entering unit, it would attack any enemy unit that got in the way but instead the unit walked stupidly and eventually made its way to the players base.
I am wondering if the AI editor can be used to control trigger created units, and if it would make the attack commands actually work.
The desired result I want for the computer player's actions is to attack any player's base, and attack in several small groups at different places at once.
06-29-2010, 04:00 AM#2
Fledermaus
What's wrong with making it Attack-Move To the position?
06-29-2010, 04:17 AM#3
Monster_Penguin
The attack order isn't smart enough for the terrain. Depending on where the player built their capital building that is added to the unit group upon completion, the attacking units will get caught on a cliff side in the terrain. I'm curious as to whether or not the AI editor would make the units smart, and if it would make them go around terrain obstacles to get to the player.

Also, in the map players can build walls to block off the entrances to their base, I am not sure if this is part of the problem. The problem being that the unit, with the trigger I am currently using, cannot recognize the temporarily blocked off entrance from built walls as a pathable entrance.

I tried to count for that problem though making it a patrol command in the trigger hoping that the units would start attacking the blocking walls automatically but instead they go the shortest distance terrain wise which leads them to a cliff.
06-29-2010, 06:14 AM#4
Av3n
The thing with the AI editor is that they use "Captains" which are invisible units which attack waves are assigned to (If I remember correctly). Archmage Ownlecaster should have more info regarding AI that me anyways (Sorry if i spelt it wrong Archmage).

Plus depending on the situation, it it is no where near Melee the AI Editor won't work too well with your map. Handling the units with Triggers is most likely your best move (using timer checks if units are in range and if it is a building etc.)

-Av3n
06-30-2010, 03:31 PM#5
Monster_Penguin
What do you mean by timer checks? And are you saying have more commands when the unit comes within a certain range of the player's town hall?
07-01-2010, 04:20 AM#6
Av3n
What i reckon is to do something similar to what the AI triggers does (via AI Editor) with actual triggers. The Pros of doing it this way means you have slightly more freedom but the Cons of it is that you wouldn't be able to use the AI specific functions.

You should PM Archmage bout this tuff cause he has more experience with AI than me ^^.

-Av3n