• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

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