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

Unselectable and selectable unit at the same time?

Status
Not open for further replies.
Level 19
Joined
Apr 25, 2006
Messages
1,309
EDIT: The problem was solved. I read from other post that making the model name .mdl while opening the box with shift does the thing I was looking for.
I have a problem with a bag unit I use for players. How can I make the bag hero unselectable in the game field with drag selection and selectable only through pressing the bag hero icon? Is there a way to do this?
 
Last edited:
Here is how to do it:
  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Trigger - Add to One <gen> the event (Player - (Player((Integer A))) Selects a unit)
  • One
    • Events
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions
      • Set TempGroup = (Units currently selected by (Triggering player))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in TempGroup) Not equal to 1
        • Then - Actions
          • Unit Group - Pick every unit in TempGroup and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Triggering unit) Not equal to (Picked unit)
                • Then - Actions
                  • Selection - Remove (Triggering unit) from selection for (Triggering player)
                • Else - Actions
        • Else - Actions
      • Custom script: call DestroyGroup (udg_TempGroup)
Of course the removal of selection occurs a second after, but that's your best bet.
 
Status
Not open for further replies.
Top