[Trigger] How to make unit attack certain unit?

Status
Not open for further replies.
Level 8
Joined
Sep 18, 2008
Messages
293
Im currently working on a single player Gladiator style map, but i have one problem. I want a trigger so when the units spawn, they enter the arena and immeditly go after the hero. This would be quite simple if i have 1 hero to use, but i have 3 to choose from, so i need help! +REP will be gladly awarded if im helped :grin:
 
Uh...

So you have this trigger that detects what hero is selected, don't you?

Create a variable named "Hero" for example. Then do

Set Hero = <the unit that was selected>

Then in the attack trigger, order units to attack <Hero>.

Umm. :nw:

Well my trigger for choosing a hero is:
  • CoP Matron
    • Events
      • Unit - A unit comes within 100.00 of Circle of Power (medium) 0006 <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Soul
    • Actions
      • Unit - Create 1 Succubus for (Owner of (Triggering unit)) at (Center of Passives <gen>) facing Default building facing degrees
      • Unit - Remove (Triggering unit) from the game
      • Camera - Pan camera for (Owner of (Triggering unit)) to (Center of Passives <gen>) over 1.00 seconds
      • Trigger - Turn off (This trigger)
This trigger is repeated 2 different times for the other 2 heroes.

So how how i make it so "Set Hero = <the unit that was selected>"
 
  • Actions
    • Unit - Create 1 Succubus for (Owner of (Triggering unit)) at (Center of Passives <gen>) facing Default building facing degrees
    • Set Hero = Last created unit
    • Unit - Remove (Triggering unit) from the game
    • Camera - Pan camera for (Owner of (Triggering unit)) to (Center of Passives <gen>) over 1.00 seconds
    • Trigger - Turn off (This trigger)
 
Status
Not open for further replies.
Back
Top