HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Unit problems

02-02-2004, 02:03 AM#1
Mink
In one of my games we have a computer player that is controlled by another player. Unfortunately there is a problem. The units that the computer player has don't always obey the oreders given, and will do what they want even if there is no AI running. I had it run a blank AI but still no luck. Why are my units doing this? They shouldn't be doing anything at all but they are trying their damndest to get the person controlling them killed.
02-02-2004, 08:38 AM#2
Vidstige
If there is no AI running, it only means that there is noone controlling the units. The units will act on there own though, if they see someone they believe hostile, they will attack. Have you made sure that the human and computer are in the same force?
02-02-2004, 08:48 AM#3
Tommi
Remove all guard positions of the AI player's units and then recycle them all (you need a pick-all-units loop for the latter, if you are using GUI). It usually helps.

AFAIK, guard positions are made only for preplaced units, so you need to do this only once.

Cheers,

Tommi
02-02-2004, 04:35 PM#4
Mink
Well the main unit that is having the problem with this is the spawned units that I create. The biggest problem is that the spawned unit has a button for transfomation, and that will be pressed randomly when the player is not wanting to use it. The button was based on a spell but the effects were removed. I was unsure if this was a problem with the units being controlled by the computer so I changed the spell basis to a more passive spell and it still will activate the trigger spell occasionally. And when left alone the unit will wander off on it's own to the start location for the computer player. Will turning off the guard positions and recycling them help? And how often do I need to set it to do that?
02-02-2004, 08:39 PM#5
Tommi
If you run an AI, which creates captains (all Blizzard AIs do), newly created units will first occupy guard positions and then attend to the defense captain. Since you have not moved the defense captain from the starting location, all newly created units will go there.

You must either assign new units to the attack group (after which they attend to the attack captain), or move the defense captain. To do these, you most likely need to use a custom AI. You may try my attack AI, for example:

http://www.hut.fi/~tgustafs/wc3attackai.html

It can be used to move both the attack and defense captains.

If you are using Blizzard AIs (made in the TFT AI editor), there are no easy solutions. Moving the defense captain is impossible in Blizzard AIs, I think. Also, Blizzard AIs quite randomly assign units to the attack group, usually when the attack captain has returned home from an attack trip.

Hope it helped.

Cheers,

Tommi

EDIT: Note that "Select attack group" (0,1) selects the attack captain and "Select defense group" (0,2) selects the defense captain.

EDIT2: Yes, removing and recycling guard positions may help. You need to do it once for the starting units. If you don't have preplaced units, it doesn't do anything I think. In any case, you may try it out. Once for every unit is enough.
02-02-2004, 08:44 PM#6
Mink
Thank you much, that was very helpfull. If the AI assigns captains, would it assign a captain to the only unit that is on the map in the begining of the game? I have one acolyte for the computer there but that is it. He is at the start location so if that is true that may be where they were going.

If I use your AI, will the computer use abilities on it's own? I don't actually have an AI loaded which is what is causing me so much confusion. A suggestion from someone else I was talking to was to load a blank AI and see if that worked but no luck there, same problem. But if what you are saying is happening it would make sense.
02-02-2004, 08:51 PM#7
Tommi
Yes, units will use their abilities, when you use my AI. The AI will also remove and recycle guard positions automatically, so you don't worry about it either.

Cheers,

Tommi
02-02-2004, 08:56 PM#8
Mink
Well the units wandering is only one problem. The other is that the computer (Wether the AI is there or not) will use the abilities of the hero that the player is controlling. One ability is a blank ability that starts a trigger spell that is supposed to be player controlled. (A transformation ability that the computer seems to use at the worst times. this is a werewolf type map) Can it be set to ignore that ability?
02-02-2004, 09:31 PM#9
Tommi
As far as I know, no.