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

how to make unit unselectable (temporary)

Status
Not open for further replies.
Level 12
Joined
Jul 17, 2013
Messages
544
What i need to do is to make my hero not click able for 2 seconds, after 2 second passes unit can be clicked by player again. what i have tired is adding locust ability to my unit via custom script but the problem is my unit stays unselectable forever, even when i remove locust
1629848124735.png
 
Not sure if it works, but tried morphing it into an alternative unit with Locust?
Otherwise, hiding it and creating a temporary unit with locust?
That or hide and create a special-effect of the unit.
Note that you'll need to teleport away the special-effect before destroying it in order to avoid visible death-animation.
 

Uncle

Warcraft Moderator
Level 74
Joined
Aug 10, 2018
Messages
7,961
You MAY be able to pull a weird trick with Skins:
  • Set Variable YourUnit = some unit
  • Custom script: call BlzSetUnitSkin(udg_YourUnit, 'nzin')

That should set a unit's skin to the "zone indicator" model or whatever rawcode you plug in. I used the zone indicator since it's hidden/unselectable (unless already selected). Note that skins might cause unwanted side effects or desync crap.

This Action is only available on newer versions.
 
Status
Not open for further replies.
Top