Need Help With a Trigger

Bauf

New Member
Reaction score
1
-----
Events:
Unit - A unit Is issued an order targeting an object
Actions:
Game - Display to (All players) the text: ("Unit: " + (Name of (Ordered unit)))
-----

Now, while playing my map, when I select a hero and right click an item the displayed text will read:

"Unit: "

The name of the ordered unit is not being displayed. I have used the editor for a long time now but for some reason, unknown to me, this isn't working. Can someone help me? I have a feeling my map is boned.
 

Exfyre

hmm...
Reaction score
60
instead of (ordered unit) use (triggering unit).
(ordered unit) refers to the unit receiving the order
 

1337Elite

New Member
Reaction score
14
You want the name of the unit that is being ordered or the unit that the selected unit has been ordered to attack?
 

Bauf

New Member
Reaction score
1
I DO want the unit that is being ordered. That is why I am using (Ordered Unit) and not (Target Unit of Issued Order). Triggering Unit does not work either.
This trigger was much larger but I started deleting actions and conditions until I figured out what the error was. Eventually I broke it down this far and there is still an error.
I have a feeling the GUI ---> Jass converter messed up and left some garbage code in my map somewhere.
 

Exfyre

hmm...
Reaction score
60
you can't use (ordered unit) because the order was issued on an item - not a unit.
 

vypur85

Hibernate
Reaction score
803
you can't use (ordered unit) because the order was issued on an item - not a unit.
You can because the ordered unit (the ordered hero) is indeed a unit.

Well, this worked for me (I've tried by right-click on item and units):
Code:
Untitled Trigger 001
    Events
        Unit - A unit Is issued an order targeting an object
    Conditions
    Actions
        Game - Display to (All players) the text: (Unit:  + (Name of (Triggering unit)))

Exactly like your trigger. Does you unit has a name? o_O
 

Bauf

New Member
Reaction score
1
Arg

Yea it does have a name. It doesn't work for any unit. Thanks for clearing that up for me though. Now I know my map is broken and I gotta start over.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top