• 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.

Make unit ignore orders

Status
Not open for further replies.
Level 4
Joined
Aug 20, 2004
Messages
65
How would I make a unit retain ownership to a certain player, but have it ignore all commands given to it, while still letting enemies attack and kill it (meaning I don't want to use locust).
 
Level 5
Joined
Nov 7, 2007
Messages
134
Make it a ward, they can still be issued move orders but all other orders are hidden so you just overwride those with triggers. Such as seen in the AoS, EotA.

It depends on if he wants it to be able to recieve move orders or not, if he doesn't, then turning it into a ward won't solve the problem.
 
Level 5
Joined
Nov 7, 2007
Messages
134
If the ward has movement then you can order it to move, but nothing else. If he doesn't want the player to be able to order the unit to move then simply turning the unit into a ward won't solve the problem, as I mentioned earlier.
 
Level 4
Joined
Aug 20, 2004
Messages
65
I probably should have said what I wanted the unit to do, sorry.

I have a skill in my map that creates a unit next to every enemy hero on the map and then attack them. I want the units to be able to chase the heroes they are attacking, and the enemies to be able to fight back, but don't want the player to be able to have all the spawned units gang up on one hero or even change their targets.

I guess I might resort to having them be deselected when their owner clicks on them.

Hah, I never understood why that healing ward in DotA could move around. I guess they got lazy.
 
Level 4
Joined
Aug 20, 2004
Messages
65
If it has locust, enemies can't fight back, and as mentioned, wards can still be ordered to move/attack a certain target.

How much would the delay effect a trigger deselecting the unit? Would it always be there, or would it be based on the hosts connection/players pings, etc?
 
Level 5
Joined
Nov 7, 2007
Messages
134
The ward will not work, you cannot cast spells or see any of the control buttons, but you can still move around and even attack by using right-clicking with the mouse, I know becouse I just tried turning a knight into a ward and he could still be ordered to attack.
 
Level 5
Joined
Nov 7, 2007
Messages
134
Alright, I think I found a way for this to work now.

Event
- A unit starts the effect of an ability

Conditions
- Ability being cast equal to "YOUR ABILITY"

Actions
- Create 1 "YOUR UNIT" for (Owner of casting unit) at (position of (Target unit of ability being cast)) facing default building facing e.t.c.
- Change ownership of (Last created unit) into (Player 12 Brown) and retain color.
- Make (Owner of casting unit) treat (Player 12 Brown) as an ally with shared vision.
- Make (Player 12 Brown) treat (Owner of casting unit) as an ally with shared vision.
- Order (Last created unit) to attack (Target unit of ability being cast).
- Add a (Duration of spell) second generic expiriation timer for (Last created unit)
- Wait (Duration of spell) seconds.
- Make (Owner of casting unit) treat (Player 12 Brown) as an Enemy.
- Make (Player 12 Brown) treat (Owner of casting unit) as an Enemy.

I used Player 12 here, but you can just use any player (or neutral hostile perhaps) that isn't occupied. I tested this and it should work, good luck!
 
Level 7
Joined
Mar 24, 2008
Messages
184
ward plus

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

should do the trick maybe (took from The Warcraft III Ability Guide - Wc3campaigns)
 
Level 12
Joined
Mar 16, 2006
Messages
992
Ward the unit.
Then block smart orders.
Then cycle through the list of units who are pets/whatever to randomly order then to attack areas within X distance of them. Check if they're within X range of the pet master, and if they're too far, have them move towards him.

Vexorian has a system already made for this, though it wouldn't be that hard to make one yourself.
 
Status
Not open for further replies.
Top