Disabling Unit Control

Jazradel

Helping people do more by doing less.
Reaction score
102
I want to make it so a unit appears as though it is under another players control.

It would still be selectable and it would be your color. You couldn't order it, but it would be attackable and still able to follow order's given by triggers.
 
W

what666said

Guest
Two choices:

Either make a trigger that runs whenever a unit is given an order, checks for your specific unit, and then orders him to stop...

OR:

You give the unit to neutral passive and use the "maintain original color" or whtaever it's called. I know it's in there I was using it this morning in my map.
 

Jazradel

Helping people do more by doing less.
Reaction score
102
I already have that trigger, but it activates itself. So it go into an endloop and crashes the game. I guess I could work around that by having it turn itself off and then on again but I can imagine it would be buggy.

I can't switch it to neutral passive/hostile whatever because then it won't attack other players units.
 
W

what666said

Guest
Use a condition to check what the action being given is equal to stop, if it is just dont do anything.

You'll have to also make a check to see who is giving the action, if it isn't the owner of the unit you should ignore it also (since i assume you want to allow trigger orders to go through, and I doubt you want to turn the stop trigger off everytime you give an order and turn it back on afterwards)
 

Jazradel

Helping people do more by doing less.
Reaction score
102
Sry it won't work.

The idea is, the units are created, then order to move along a series of points via triggers. You should still be able to view the stats of they unit, but not the abilities it has, etc. And of course you can't change they're orders.

This would be best accomplished by making the units belong to another player but I can't do it like that.

Detecting what order a unit is given won't work because Warcraft III only detects commands as Attack not Attack Specific Unit or Attack Location or whatever.

Good idea detecting who gave the order though.
 

SilverHawk

General Iroh - Dragon of the West
Reaction score
89
Jazradel said:
I already have that trigger, but it activates itself. So it go into an endloop and crashes the game. I guess I could work around that by having it turn itself off and then on again but I can imagine it would be buggy.

Couple this with a boolean variable to prevent it from running more than once.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top