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

Unable a player to control it's own unit

Status
Not open for further replies.
Level 3
Joined
Feb 11, 2013
Messages
28
Hello everyone, can anyone tell me how to unable a player to control their own unit? I have created a trigger :-

  • Event
  • Time - Every 15 second of the game
  • Condition-
  • Action -
  • Create 1 footman for Player 2 at random point at region 01.
  • Order Last created unit to patrol to position of Dummy 0096 gen.
  • Create 1 Rifleman for Player 2 at random point at region 01.
  • Order Last created unit to patrol to position of Dummy 0096 gen.

I don't want the player 2 to control the last created unit. How to unable a player to control its own units without affecting the unit current order [ patrol to position of Dummy 0096 gen ]?
 
Level 10
Joined
Dec 15, 2012
Messages
650
Why not try the function of DotA Fun ??
[Trigger=Trigger]Trigger
Events
Player - (Player((Random integer number between 1 and 12))) Selects a unit
Conditions
(Triggering unit) Equal to UnitCannotBeSelected
Actions
Selection - Remove (Triggering unit) from selection for (Triggering player)[/Trigger]
Don't make only the (owner of unit) cannot selects UNIT because it still be controlled by other players when he/she shared his/her units control.This is a weak idea instead.
 
Most elegant way (and best looking):

Add ward classification to the unit. This hides the command card and unables all abilities and commands except the smart order (right clicking).

You can then simply detect when the player issues the smart order and trigger an immediate stop order.

The nice thing about this stuff is, that you are still able to order the unit by triggers and use all of its abilities via triggers.
 
Status
Not open for further replies.
Top