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

Escape trigger for computer AI help needed

Status
Not open for further replies.
Level 14
Joined
Mar 27, 2008
Messages
1,003
So I have this trigger here.

  • Survivor Scramble
    • Events
      • Unit - A unit comes within 500.00 of Dark Entity 0022 <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Survivor
      • ((Owner of (Triggering unit)) controller) Equal to Computer
    • Actions
What I need to do is, for the action I need the Survivor to automatically use his "Sprint" skill if he has enough energy (mana) to do so.
Also I need the Survivor to run in the opposite direction away from the Dark Entity.

Can anyone help me with this?
 
Level 5
Joined
Jun 14, 2009
Messages
106
I am assuming that this "Sprint" skill is an ability to increase his movement speed, right?

Well use the following two commands:
Order unit to cast his abiltiy
Order unit to move in direction which is opposite to this Dark Entity

  • Unit - Order SprintingUnit to Night Elf Priestess Of The Moon - Scout
  • Unit - Order SprintingUnit to Move To ((Position of SprintingUnit) offset by 700.00 towards (Angle from (Position of DarkEntity) to (Position of SprintingUnit)) degrees)
Now you need to replace the command string on which your ability is based in the first line.
If the unit does not have enough mana, the first line won't work automatically
 
Level 14
Joined
Mar 27, 2008
Messages
1,003
I am assuming that this "Sprint" skill is an ability to increase his movement speed, right?

Well use the following two commands:
Order unit to cast his abiltiy
Order unit to move in direction which is opposite to this Dark Entity

  • Unit - Order SprintingUnit to Night Elf Priestess Of The Moon - Scout
  • Unit - Order SprintingUnit to Move To ((Position of SprintingUnit) offset by 700.00 towards (Angle from (Position of DarkEntity) to (Position of SprintingUnit)) degrees)
Now you need to replace the command string on which your ability is based in the first line.
If the unit does not have enough mana, the first line won't work automatically

It worked! Thank you so much! + Rep
 
Status
Not open for further replies.
Top