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

Event - Unit is issued order targeting a point (order for buildings)

Status
Not open for further replies.
Level 13
Joined
Mar 4, 2009
Messages
1,156
how can i make it so when my unit is ordered to build a building of some type,that than i order him to stop

something like

Event - Unit is issued order targeting a point
Condition
issued order equal to "build unit type - Wall"
Action
Order triggering unit to stop


Is it possible to do the orange part?

EDIT: I did not ask how can i order unit to build a building at point,i want to know how can my trigger see if my unit is ordered to build a building (for example building House)
 
Last edited:
Level 37
Joined
Mar 6, 2006
Messages
9,240
Use this trigger to find out the order strings:

  • ISSUE ORDER
    • Events
      • Unit - A unit Is issued an order with no target
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order targeting an object
    • Conditions
    • Actions
      • Floating Text - Create floating text that reads (String((Issued order))) above (Triggering unit) with Z offset 64.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Set the velocity of (Last created floating text) to 100.00 towards 90.00 degrees
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 1.70 seconds
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
  • Untitled Trigger 069
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • (Issued order) Equal to (Order(farm))
    • Actions
      • Unit - Order (Triggering unit) to Stop
That will make the unit to stop if it is orderer to build a farm. Is that what you're trying to accomplish? This trigger will bug BTW, but it's just an example.
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
....


Is there a condition that will check if unit if ordered to build a building (for example building House )

than i order him to stop

and if he is ordered to build something else than i don't want to stop him
 
Level 15
Joined
Aug 11, 2009
Messages
1,606
  • Untitled Trigger 069
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • (Issued order) Equal to (Order(farm))
    • Actions
      • Unit - Order (Triggering unit) to Stop
That will make the unit to stop if it is orderer to build a farm. Is that what you're trying to accomplish? This trigger will bug BTW, but it's just an example.

Bug?There is no way to fix this?
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Is there a condition that will check if unit if ordered to build a building (for example building House )

than i order him to stop

and if he is ordered to build something else than i don't want to stop him

Yes, the trigger I posted does just that. And I also posted the trigger with which you can find out all order strings of buildings/whatever.


Bug?There is no way to fix this?

Yes there is :)
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
  • Untitled Trigger 069
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • (Issued order) Equal to (Order(farm))
    • Actions
      • Unit - Order (Triggering unit) to Stop
That will make the unit to stop if it is orderer to build a farm. Is that what you're trying to accomplish? This trigger will bug BTW, but it's just an example.
lol i tried it and it actually works , (sorry i never tough it will work if i just type a name of building)

to stop the unit you cannot just use stop order

you can replace the unit
select replaced unit
game order owner of selected unit to press "B"
game order owner of selected unit to press "hotkey of structure"

or run a timer that will expire in 0.01 sec and when timer expires than stop the unit

+REP ...

is there a better way to stop some ordered unit ?
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
I see that as the best solution.
I found a better one so u don't need to use timers

also you need to pause a ordered unit to stop orders like build structure

You need to make a dummy unit (called STOPPER) for each player


  • UNIT IS ORDERED
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • issued order equal to (build order)
    • Actions
      • Unit - Pause (Triggering unit)
      • Set ORDERED_UNIT[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
      • Unit - Order STOPPER[(Player number of (Owner of (Triggering unit)))] to Orc Tauren Chieftain - War Stomp
  • STOP ORDERED UNIT
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to WAR STOPM-CASTING TIME 0.01
    • Actions
      • Unit - Unpause ORDERED_UNIT[(Player number of (Owner of (Triggering unit)))]
      • Unit - Order ORDERED_UNIT[(Player number of (Owner of (Triggering unit)))] to Stop
      • Unit - Order (Triggering unit) to Stop
      • Set ORDERED_UNIT[(Player number of (Owner of (Triggering unit)))] = No unit
This trigger work only for orders like blink,build,chain lightning....

if you have order like "move" it will order every selected unit to move (not just one)

that you will have to make a unit group and later stop the unit group....

or maybe it is better to make at position of ordered unit that dies for 0.01 sec

and when that unit dies

pick random unit within 0.01 range of dying unit............
 
Status
Not open for further replies.
Top