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

control of a unit

Status
Not open for further replies.
If you are really desperate for someone not to order a unit to move or make an action you could do it like this as the event a player selects a unit isn't instant. Although this way is flauntingly inefficient.
  • Deselect
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set UnitGroup = (Units currently selected by Player 1 (Red))
      • Unit Group - Pick every unit in UnitGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is A structure) Not equal to True
            • Then - Actions
              • Selection - Remove (Picked unit) from selection for Player 1 (Red)
            • Else - Actions
      • Custom script: call DestroyGroup(udg_UnitGroup)
This way insures no way for Player 1 to not be able to even look like he can select the unit let alone order the unit to do something.
 
Status
Not open for further replies.
Top