• Check out the results of the Techtree Contest #19!
  • 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 void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Temperoryly Unselectable Unit

Status
Not open for further replies.
Level 8
Joined
Mar 26, 2009
Messages
301
Is there way to prevent player from selecting a unit; ordering that unit to do actions via triggers and enable selection again?
I tried this with "Deselect all units for Player A" action and "0.01 seconds looping" timed event but unit can be still clicked (even for a minor amount of time) and this causes a bug since there is another trigger exist which is launched with clicking a unit. Disabling and re-enabling that trigger between actions cause even more bugs =) So any suggestions?
 
thats possible :P

JASS:
call UnitAddAbility(Yourunit, 'Aloc')
call UnitRemoveAbility(Yourunit, 'Aloc')
Run these as custom script to add/remove locust^^ Yourunit is the unit variable

What I meant before:
You check if the player which selects a unit can select units. If he can you run your trigger else you deselect the unit.
 
Status
Not open for further replies.
Back
Top