How to make your own unit cannot be controlled by the owner of the unit.

Nherwyziant

Be better than you were yesterday :D
Reaction score
96
My map is almost done, but there's a small thing i need to be done.

How will i make my unit cannot be controlled by the owner of the unit?
( not pause, the unit is moving in regions to regions )

Thanks.
 

naughty

New Member
Reaction score
12
Well you can try with this one:
JASS:
Events
    Player - Player 1 (Red) Selects a unit
Conditions
    (Unit-type of (Triggering unit)) Equal to YOUR UNIT
Actions
    Selection - Remove (Triggering unit) from selection for Player 1 (Red)

But this is not so efficient, the player can still move the unit if he does it really fast. I'd suggest that if your unit only moves from regions to regions, that you make a trigger that will order the unit to move to that point every 0.01 seconds so the player can't click that fast. But if your unit needs to do more actions than it will produce some lag i guess.
Or maybe you can make a trigger that will remove the specified unit from owner of the same unit's selection every 0.01 seconds :)
 

saw792

Is known to say things. That is all.
Reaction score
280
Give the unit the 'Ward' classification, and add this trigger:
Code:
Untitled Trigger 001
    Events
        Unit - A unit Is issued an order targeting a point
        Unit - A unit Is issued an order targeting an object
    Conditions
        (Issued order) Equal to (Order(smart))
        <Other conditions such as unit type, owning player, etc>
    Actions
        Order (Triggering Unit) to <whatever it's actions should be at this time>
 

Genyuumaru

New Member
Reaction score
15
It's impossible. The ward thing is too much trouble.

Been there, done that, but unfortunately without any hope :(

Try using Neutral Victim and Neutral Extra :thup:
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Lolz.... Anyone tried, disabling control for player , and enabling it when necessary? Its under cinematics..
 

Curo

Why am I still playing this game...?
Reaction score
109
@ naughty: that trigger will fail since there is no triggering unit.

I actually made a system for this that worked, but for some reason it just stopped working again. I used it to make Interceptors controlled by a Protoss Carrier uncontrollable.

Depending on the uses, you could give the units locust. They can't be controlled or manually targeted, but AI will still auto-target them.

@ skyblade: if you disable player control, you won't be able to control anything at all.
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
But, locusts is invulnerable? Anyway, I thought disabling all control was what he wanted for awhile, and when he reach the region, enable control. Well...

Edit: Cuz disabling control, can be done for tht single player, and if u read the thread properly, it meant how to make the units of the owner unable to be controlled by the owner.
 

Demonfaze

8 yrs. Hell, it's been a long time.
Reaction score
72
Change the unit ownership to an allied computer player, then handle any player-specific functions (ex: bounty, kill count, etc.) via triggers.
 

saw792

Is known to say things. That is all.
Reaction score
280
Genyuumaru said:
It's impossible. The ward thing is too much trouble.

Umm...what? How is it impossible. It works. What are you talking about?

This is exactly how it is done in castle fight, for example.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,494
> that trigger will fail since there is no triggering unit.

Actually, there is. It's the unit you selected.

And, Locusts are unvulnerable in the sense that you can't target them anymore with an attack or a spell, which makes it somewhat difficult to damage them...
 

Genyuumaru

New Member
Reaction score
15
Oh yeah, create every possible situation with triggers for every possible place the unit can go to!

Like if I order it go somewhere the trigger will order it to go to:
Region 002 if it's between regions 001 and 002
Region 003 if it's between regions 002 and 003
etc. for every region pair.

Be realistic people -_-

Oh and don't start to talk about Castle Fight. It only has 2 regions and conditions. If the unit is in the top lane, then go to region 1, but if it's in the bottom lane, then go to region 2. Wow...

NOT for AoS or other maps!
 

Nherwyziant

Be better than you were yesterday :D
Reaction score
96
thanks for helping

Thanks guys, i have now solved my problem. My map will be finished within just hmm 24 hours.:)
 

Nexor

...
Reaction score
74
create 2 types of the unit, one with locust and one without it, then replace it (if you want to have control over it after some time)
 

denmax

You can change this now in User CP.
Reaction score
155
create 2 types of the unit, one with locust and one without it, then replace it (if you want to have control over it after some time)

It's gonna give undesirable effects since it has locust. It cannot be targeted by spells and to the fact that it cannot be picked by Unit Groups in triggers.
 

Nexor

...
Reaction score
74
actually it can be picked...
how would you order a dummy unit if it couln't be selected somehow?
 

saw792

Is known to say things. That is all.
Reaction score
280
It can be picked in some Pick Every Unit... actions, but most cannot pick it.

You command dummy units after you create them with the 'Last Created Unit' reference.
 

saw792

Is known to say things. That is all.
Reaction score
280
...which doesn't solve the problem of them being invulnerable and untargetable.
 

denmax

You can change this now in User CP.
Reaction score
155
What I mean to say is that it cannot be picked by UGs of custom spells that use UGs..

Understand? You cannot detect "Last created unit" unless it is created within the trigger..
 

Nexor

...
Reaction score
74
he just want to disable player control, this solves this problem, but you can't use the unit for some action
 
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