• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] How to make unit attack certain unit?

Status
Not open for further replies.
Level 8
Joined
Sep 18, 2008
Messages
298
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:
 
Level 8
Joined
Sep 18, 2008
Messages
298
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>"
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
  • 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.
Top