Removing the "Smart" order?

Status
Not open for further replies.
Level 10
Joined
Feb 7, 2005
Messages
409
hey I'm wondering if there's a way to remove the smart order, just like you can remove Aatk (for attack) or Amov (for move).

My goal in this is to create a unit who only follows orders via triggers but is still player controlled. I plan on doing this by making the unit classified as "ward" (to remove the ability command card) and then removing "smart" to remove player control completely but still allow them to be selected and controlled via triggers.

-Teld
 
Level 12
Joined
Jul 27, 2008
Messages
1,181
The easiest way is to have an 100% same (but hidden & invulnerable) dummy unit, and select that when the player selects the other one. You can disable attack & movement, and just instantly move it to the location of the true unit every 0.05 seconds.
 
Level 7
Joined
Mar 24, 2008
Messages
184
you can use this function to catch and block "smart" order (took from http://www.wc3c.net/showthread.php?t=81742)

JASS:
function Catch_Order_Actions takes nothing returns nothing
  if GetIssuedOrderId() == OrderId("smart") then
    call PauseUnit(GetOrderedUnit(), true)
    call IssueImmediateOrder(GetOrderedUnit(), "stop")
    call PauseUnit(GetOrderedUnit(), false)
  endif
endfunction

function Catch_Order takes nothing returns nothing
  local trigger t = CreateTrigger()
  call TriggerRegisterUnitEvent(t, gg_unit_hpea_0006, EVENT_UNIT_ISSUED_TARGET_ORDER)
  call TriggerRegisterUnitEvent(t, gg_unit_hpea_0006, EVENT_UNIT_ISSUED_POINT_ORDER)
  call TriggerAddAction(t, function Catch_Order_Actions)
endfunction

Instead of stop you can put any order you want
 
Last edited:
Level 10
Joined
Feb 7, 2005
Messages
409
hmm I have decided to use said script code, the only problem is if you mass click you can still slow the units down but I guess that'll have to do. (you can slow them down faster if you select a group at a time, this would allow a player to build up spawns)
 
Status
Not open for further replies.
Top