• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Making ai units instantly aiming enemy

Status
Not open for further replies.
Level 11
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 39
Joined
Feb 27, 2007
Messages
5,010
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