• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

how to make unit unselectable (temporary)

Status
Not open for further replies.
Level 11
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 64
Joined
Aug 10, 2018
Messages
6,535
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