• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

UI attack icon problem

Status
Not open for further replies.
Hero has 2 attacks enabled. 1st is melee, 2nd is ranged.
I want to switch between melee to ranged for a limited time.
Im using silence-based ability to disable melee attack.
All works fine with one side effect:
on UI attack icon dissapears while hero is silenced like on picture

hero can attack (2nd ranged attack is enabled) but this looks weird w/o attack icon displayed.
Any ideas how to fix it? (no metamorphosis please)
 

Attachments

  • UI problem.jpg
    UI problem.jpg
    149.9 KB · Views: 68
Level 41
Joined
Feb 27, 2007
Messages
5,191
Okay then you'll have to temporarily morph into an identical unit with a ranged attack. As long as all temporarily-added abilities are set to Permanent you won't lose them when transforming. This method is probably the best and will work with Heroes or units without any of the side-effects Chaos brings: Hero passive transformation. 1 bear form ability to morph to ranged paladin and 1 bear form ability to morph to regular paladin.
 
Level 9
Joined
Sep 20, 2015
Messages
385
What about create a dummy ability(with same attack icon and position) with channel, and use triggers to make the unit attack?
This ability is added only when the unit is silenced, then u remove it
with a trigger like this :

Every 0.03 seconds
if
unit has bufftype = silence
then
add dummy ability
else
remove dummy ability
 
Status
Not open for further replies.
Top