• 🏆 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!

get current order of unit possible?

Status
Not open for further replies.
Level 37
Joined
Mar 6, 2006
Messages
9,240
  • Untitled Trigger 018
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Target unit of issued order) Equal to No unit
        • Then - Actions
          • -------- It is an item --------
        • Else - Actions
          • -------- It is a unit --------
 
Level 11
Joined
Dec 31, 2007
Messages
780
actually its between a point or an object. I want to redirect the order the unit is currently obeying. something like

  • Melee Initialization
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) (blabla)
    • Actions
      • Unit - Order (Target unit of ability being cast) to "current order of target unit" ("random unit in playable map area")
      • Custom script: or
      • Unit - Order (Target unit of ability being cast) to "current order of target unit" ("random point in playable map area")
I need to know if the current order of the targeted unit is affecting a unit or a point to randomize a new target for that unit.
 
Level 11
Joined
Dec 31, 2007
Messages
780
thanks purplepoot, that worked out ^^.

Now I have another problem. Is it possible to retrieve the target of an order?

Here is an example

  • Cast Nibelung Redirect Order
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Blabla )
      • ((Target unit of ability being cast) is A Hero) Equal to (==) True
    • Actions
      • Set order = (Current order of (Target unit of ability being cast))
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • "target of order" == null
        • Then - Actions
          • something
        • Else - Actions
          • another something
Because I want to redirect the target of this ability and i don't know how to determinate if it is a unit or a point :/
 
Level 11
Joined
Dec 31, 2007
Messages
780
yes, it worked and I +repped you.

I tried to "simulate" that with the ""target of order" == null" line.

I think that what you say will be possible as only heroes are targeted by this spell

So I'll make a trigger that stores everything I need every time a hero is order to do something.

Thanks again ^^
 
Level 11
Joined
Dec 31, 2007
Messages
780
yes, the problem was that i was unable to retrieve the target of the order. If i don't have the target i cant determinate if it is point or target order. I didn't expressed my self correctly :p

But now I have a way so everything is solved ^^
 
Status
Not open for further replies.
Top