HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Computer teams Auto Attacking

05-14-2006, 06:19 PM#1
Devion
Hey

Ive been looking around with the search function to find anything about this, but i couldnt find anything. Im sorry if there is already a post about this :)

The thing is, its been a while since i created WC3 maps and this time im creating a map which is based on 2 computer teams and 10 players (kinda like dota style). I dont know/remember how to make the computer units attack each other when they see something. Im not sure if i can do this with AI or triggers or JASS (i cant do much in JASS).

Any help is apriciated.
05-14-2006, 06:43 PM#2
iNfraNe
Units will automaticly attack eachother if they arent allied (force settings) and if their acquisition range is great enough (object editor).

To make them attack eachother like in dota you must order them to attackmove to the other side.
05-14-2006, 06:47 PM#3
Devion
Ahhh, thats kinda simple :)
05-14-2006, 07:49 PM#4
Devion
Oh and one more thing, when they attack something its all ok, but when there is nothing to attack it just goes back to where they came from, how can i fix this?
05-15-2006, 04:19 PM#5
The)TideHunter(
Trigger:
Move Unit
Collapse Events
Event - Your event
Conditions
Collapse Actions
Unit - Order YourUnit to Attack-Move To YourPoint

This will order a unit to move to a location, if it sees any enemy unit on its way, it will attack it, once it reaches its destination, it will just stand there until it is reordered or a enemy unit comes within its range
05-15-2006, 04:26 PM#6
Vuen
No, you need to turn off AI guard positions. Otherwise after a while the computer will order them to go back home on their own.
05-15-2006, 04:31 PM#7
iNfraNe
This will not work on neutral hostile units tho, so do not choose neutral hostile as one of the attacking players.
05-17-2006, 01:52 PM#8
Devion
Uhm, i see the point but how exactly do i turn of the guard positions. afaik im not running any AI. i found something in game constants but it didnt help.
im kinda new so i would like where i set it and what i set it too ;)
05-17-2006, 02:24 PM#9
moyack
If the owner of the unit doesn't have assigned any AI, there is no problem, you can use triggers instead to give orders to the unit, that's all. I suggest to create a trigger that orser to units to attack every X seconds
05-17-2006, 04:15 PM#10
Devion
if they attack every X seconds they will stop attacking if they currently are attacking something? so thats no good solution imo
05-17-2006, 05:38 PM#11
moyack
Quote:
Originally Posted by Devion
if they attack every X seconds they will stop attacking if they currently are attacking something? so thats no good solution imo
No, if you use the order

Trigger:
Unit - Order YourUnit to Attack-Move To YourPoint

it means that the unit will move and attack any enemy unit in its way to the specified point, so if YourUnit is attacking an enemy and receive that order, he has an enemy in its way (the current enemy), so YourUnit will attack the current enemy until killing it and then YourUnit will move to the specified point.
05-17-2006, 06:21 PM#12
Mystic Prophet
Quote:
Originally Posted by iNfraNe
This will not work on neutral hostile units tho, so do not choose neutral hostile as one of the attacking players.

That's strange because I couldn't get computer players to listen to order triggers but Nuetral hostile would do it just fine.

I assumed it was from the built in melee AI.