• 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.

[Trigger] AI attack issues

Status
Not open for further replies.
Level 11
Joined
Jun 13, 2007
Messages
570
Having a few issues with some AI attack commands:

When A preplaced unit is told to attack a point, when it hits that point it turns around and walks back to its guard position

So i use call RemoveGuardPosition(unit), which is fine, when it hits that location it doesn't return back. But when i use the RemoveGuardPosition(), the unit seems to lose its AI completely and no longer auto uses it's abilities or do anything besides auto attack units that come near it.

Is there a different way that I am overlooking to make a unit attack a given location and not return to its guard position...
 
Level 11
Joined
Jun 13, 2007
Messages
570
Code:
  call RemoveGuardPosition(udg_quest_TakingBackLugardEGuards[1])
  set l = GetRectCenter(gg_rct_QuestTakingBackLugardP03)
  call IssuePointOrderLocBJ(udg_quest_TakingBackLugardEGuards[1], "attack", l)
  call RemoveLocation(l)

this is an example of the code i use. If i remove the first line (RemoveGuardPosition), when he hits the location, he just turns around and walks back to the starting point.

And when I use that function, the AI stops attempting to use his abilities (one which is important, the heal)
 
Level 6
Joined
Mar 2, 2006
Messages
306
my ai units always cast spells when on stop/attack orders, but i never used preplaced units. so try this: delete those guards of yours, create them on map init and assign them to variables; then try the order thingy...
 
Status
Not open for further replies.
Top