• 🏆 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!

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