• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[General] IS there a way to make one of your units uncontrollable?

Status
Not open for further replies.
Trigger

  • Remove Locusr Copy 2
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Set u = (Random unit from (Units currently selected by Player 1 (Red)))
      • Custom script: call UnitAddAbility(udg_u, 'Aloc')
      • Custom script: call UnitRemoveAbility(udg_u, 'Aloc')
      • Unit - Add Bear Form to u
      • Unit - Order u to Night Elf Druid Of The Claw - Bear Form
      • Unit - Remove Bear Form from u
      • Wait 5.00 seconds
      • Unit - Hide u
      • Unit - Unhide u
The locust and bear form things make it unselectable and players can not target it. It can be damaged and auto attacked. Hiding/unhiding restores it back to normal. Use Metamorphosis for heroes.
 
Trigger

  • Remove Locusr Copy 2
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Set u = (Random unit from (Units currently selected by Player 1 (Red)))
      • Custom script: call UnitAddAbility(udg_u, 'Aloc')
      • Custom script: call UnitRemoveAbility(udg_u, 'Aloc')
      • Unit - Add Bear Form to u
      • Unit - Order u to Night Elf Druid Of The Claw - Bear Form
      • Unit - Remove Bear Form from u
      • Wait 5.00 seconds
      • Unit - Hide u
      • Unit - Unhide u
The locust and bear form things make it unselectable and players can not target it. It can be damaged and auto attacked. Hiding/unhiding restores it back to normal. Use Metamorphosis for heroes.

If I put player selection event, when clicked on the unit there is 0.50 or sort of pause before the deselection trigger so I can order him to go anywhere, isn't this right?
 
i had same problem like you, this worked for me i hope do for you too

[
  • Events
  • DisablePlayers
    • 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
      • (Unit-type of (Ordered unit)) equal Your_unit
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Custom value of (Triggering unit)) Not equal to 1
        • Then - Actions
          • Unit - Set the custom value of (Triggering unit) to 1
          • Unit - Order (Triggering unit) to What_Ever_You_Want_Maybe_Donothing
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Custom value of (Triggering unit)) Equal to 1
        • Then - Actions
          • Unit - Set the custom value of (Triggering unit) to 0
        • Else - Actions
i used the Custom value so i avoid infinite loops , but i think they are not necessary, not sure
 
1. Add Locust ability
2. Pause the unit
3. Set movement speed to 0
4. Make unit Neutral Passive

Those are some ways I would use to make your unit uncontrollable.

//EDIT: Actually I think just pausing the unit is the best way to go.
 
Status
Not open for further replies.
Back
Top