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

selecting a unit

Status
Not open for further replies.

007

007

Level 6
Joined
May 3, 2009
Messages
175
is it possible to make players unable to select units? its possible with doodads but i didnt find it in the units editor.
 
Level 18
Joined
Feb 28, 2009
Messages
1,971
1. You can add locust ability what will make it unselectable(and untargetable)
2. You can clean selection with such a trigger
  • Selection - Remove (Triggering unit) from selection for Some Player
(Use it with periodical trigger)
 

007

007

Level 6
Joined
May 3, 2009
Messages
175
what does the trigger do exactly? does itprevent a player from selecting the unit or does make the player from selecting the unit right now if he already has selected it?
 
You can make units unselectable in game:
  • Custom script: call UnitAddAbility (GetTriggerUnit(), 'Aloc')
Since GUI doesn't allow you to pick the Locust ability in the abilities' index.

For the deselection part krisserz suggested, you don't need a periodic event.
You can do this:
  • Trigger
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • For each (IntegerA) from 1 to 12, do (Actions)
      • Loop - Actions
        • Trigger - Add to Trigger2 <gen> the event (Player - (Player(IntegerA)) selects a unit)
  • Trigger2
  • Events
  • Conditions
    • //Condition here
  • Actions
    • Selection - Remove (Triggering unit) from selection for (Triggering player)
This will deselect the unit you will try to select, when the first one (with the locust ability) will make your unit not targetable by any spell/attack; it will actually become ignored by any unit. You can't even display its health bar when you press Alt.
 
Status
Not open for further replies.
Top