• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Making ai units instantly aiming enemy

Status
Not open for further replies.
Level 12
Joined
Jul 17, 2013
Messages
544
Hi my map is castle siege map where ai attacks players base i use trigger aim center of region to order ai to hit enemy but that trigger isn't really helpfull player base is big and players arent always in center of IT. So ai doesnt aim anything. I heard ITs possibile for units to aim enemy in large area if you change theor values. Do u think its possibile to do this by yhat way? Which values would i need to change
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
Instead of picking the center of the region it would probably be simplest to pick the location of a certain type of base unit the players can build. Something essential to the base like a town hall (or whatever trains workers) or a barracks, etc. Decide on a unit type and then do:

  • Set TempGroup = (Units of type Town Hall)
  • Set AttackPoint = (Position of (Random Unit from TempGroup))
Depending on how many human players there are (and where they can build), how many AIs there are, and how many of the chosen unit type players can build you may need to do this sort of ‘find a point and order attack’ multiple times or periodically. Give more specifics and I might have a more specific suggestion.
 
Status
Not open for further replies.
Top