• It's time to dig through Hive's model database and dust off some oldie but goldie models and enter Hive's Texturing Contest #31 : Repurposing! Click here to enter!
  • 🏆 Hive's 5th HD Modeling Contest: Creep Camp is now open! Click here to enter!

Order a unit to defend a rect/region

Level 15
Joined
Aug 7, 2013
Messages
1,337
Hi,

Is there a way to make a unit instance owned by a computer player aggressively defend a region/rect?

By this I mean, the unit instance would perform search and destroy inside this rect. If there are no enemy units in the rect, then the unit just does nothing.
 
2rmktcg.png


Here you go
 
Level 15
Joined
Aug 7, 2013
Messages
1,337
I guess that would work.

Though the Knight would miss sometimes, wouldn't he?

i.e. the knight should target each unit in the region/rect (search + destroy) versus patrol.
 
I guess that would work.

Though the Knight would miss sometimes, wouldn't he?

i.e. the knight should target each unit in the region/rect (search + destroy) versus patrol.


He will patrol the random point every 10.00 seconds in Castle <region>, he will auto attack anything that he encounters as an enemy. If you want him to be harder to bypass you can increase his line of sight/ attack radius.
 

EdgeOfChaos

E

EdgeOfChaos

Pick every unit in the region that is an enemy
if those units exist, order the guard to attack it
if not, order the guard to move randomly in the region.
 
Top