• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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 65
Joined
Aug 10, 2018
Messages
6,668
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