• 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] Order Unit Trigger

Status
Not open for further replies.
Level 8
Joined
Sep 18, 2008
Messages
298
For my map, i need in this specific part, for when unit_lever dies, then it opens a specific gate. Then i want the centaurs to move, heres the first trigger for the lever:

Lever message
Events
Unit - Lever 0110 <gen> Dies
Conditions
Actions
Destructible - Kill Magical Pen Wall 0335 <gen>
Destructible - Kill Magical Pen Wall 0337 <gen>
Destructible - Kill Magical Pen Wall 0336 <gen>
Game - Display to (All allies of Player 4 (Purple)) the text: Chieftain: Thank yo...


The next trigger, is to make the centaurs move, once the magical pen wall is destoyed:


Untitled Trigger 006
Events
Unit - A unit enters Centaurs <gen>
Conditions
(Unit-type of (Entering unit)) Equal to Centaur Chieftain
(Unit-type of (Entering unit)) Equal to Centaur Crossbowman
Actions
Unit - Order (Target unit of issued order) to Attack-Move To (Center of Centaur 1 <gen>)

Problem is...the centaurs dont move D: plz help
 
Level 16
Joined
Jul 21, 2008
Messages
1,121
I think that only problem is in this:
(Unit-type of (Entering unit)) Equal to Centaur Chieftain
(Unit-type of (Entering unit)) Equal to Centaur Crossbowman

It does not work because there is no unit that is Cent Chieftain and Crossbowman at the same time. You must use or function else trigger won't work for any unit.

  • Or (Any Condition is true)
    • (Unit-type of (Entering unit)) Equal to Centaur Chieftain
    • (Unit-type of (Entering unit)) Equal to Centaur Crossbowman

As I said, use this instead of current trigger 2 conditions.
 
Level 8
Joined
Sep 18, 2008
Messages
298
hmm...im not sure how to get the or condition to match that exactly, i only got this


Untitled Trigger 006
Events
Unit - A unit enters Centaurs <gen>
Conditions
Or - Any (Conditions) are true
Conditions
(Unit-type of (Entering unit)) Equal to Centaur Chieftain
(Unit-type of (Entering unit)) Equal to Centaur Crossbowman
Actions
Unit - Order (Target unit of issued order) to Attack-Move To (Center of Centaur 1 <gen>)
 
Level 16
Joined
Jul 21, 2008
Messages
1,121
Unit - Order (Target unit of issued order) to Attack-Move To (Center of Centaur 1 <gen>)

Replace Target Unit of issued order with Entering unit or Triggering Unit. Also locations leak (like centers of region). You should make global point variable TempPoint and make your trigger like this:

  • Untitled Trigger 006
  • Events
    • Unit - A unit enters Centaurs <gen>
  • Conditions
    • Or - Any (Conditions) are true
      • Conditions
        • (Unit-type of (Entering unit)) Equal to Centaur Chieftain
        • (Unit-type of (Entering unit)) Equal to Centaur Crossbowman
  • Actions
    • Set TempPoint = Center of Centaur 1 <gen>
    • Unit - Order (Entering Unit) to Attack-Move To TempPoint
    • Custom Script: call RemoveLocation(udg_TempPoint)
 
Level 16
Joined
Jul 21, 2008
Messages
1,121
Ok, when you get to variables screen follow these steps:
1. Push button for new variable (Ctrl+N)
2. New variable screen shows up
3. Edit first field (Variable name) to "TempPoint" (in this case)
4. Edit second field (Variable type) to Point (select it in drop down menu)
5. Don't do anything in other fields, but click Ok.
6. Your variable is done - use it in triggers :)
 
Level 8
Joined
Sep 18, 2008
Messages
298
your help is very much appreciated...and ive seen some questions regarding triggers, on other posts..and you helped them much...but the problem with your map that you gave me, is, its totally different then what im trying to put here...in my map, once a unit destorys a lever, then the magic walls surroundin the centaurs, will become destoryed...once destoryed the centaurs will attack a specific point...problem is, when the lever is destoryed, the units dont move..i alrdy know how to make units attack-move-to a certain location, but this is different..if you can, ill give you my map so you can see the problem! i complete trust you...but DONT think im beggin you to do this, only if you want to!...or we can just discuss this more to fix this
Thx
 
Level 8
Joined
Sep 18, 2008
Messages
298
will do

EDIT: Worked gr8 :D i guess becuz when i did the condtions, they were just not specific enough...but im gonna use this for my map, and sorry to bother you again...but i forgot to mention, that once the walls are destoryed, i want centaur reinforcements to come like very 80 seconds? so how will i do this
 
Status
Not open for further replies.
Top