• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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.
 

Zwiebelchen

Hosted Project GR
Level 35
Joined
Sep 17, 2009
Messages
7,236
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