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

Creating a Hero unit with 2 attacks

Level 1
Joined
Feb 19, 2019
Messages
2
I'm trying to make a rpg hero unit with both melee and range attacks. I have set attack 1 as melee range and attack 2 as ranged. I use triggers to enable and disable the attacks during my testing. Going in game, it seems like the hero is able to perform attack 2 when i disable attack 1 and enable attack 2, but it doesn't show the attack type and attack stats on the UI. Any help or explanation why this is happening?

1731500205289.png
1731500217152.png
1731500298911.png
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
I'm trying to make a rpg hero unit with both melee and range attacks. I have set attack 1 as melee range and attack 2 as ranged. I use triggers to enable and disable the attacks during my testing. Going in game, it seems like the hero is able to perform attack 2 when i disable attack 1 and enable attack 2, but it doesn't show the attack type and attack stats on the UI. Any help or explanation why this is happening?
Try using the Action to Hide/Show the Weapon UI.
  • Unit - Set Unit: (Triggering unit)'s Weapon Boolean Field: Attack Show UI ('uwu1')at Index:0 to Value: True
 
Level 1
Joined
Feb 19, 2019
Messages
2
@Uncle Thanks but it didn't work too, maybe it doesn't work with heroes. Might try to replace my unit with another ranged version maybe with some sort of morph ability @Pyrogasm Tested with the enabling attack trigger and its definitely 0 indexed.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
@Uncle Thanks but it didn't work too, maybe it doesn't work with heroes. Might try to replace my unit with another ranged version maybe with some sort of morph ability @Pyrogasm Tested with the enabling attack trigger and its definitely 0 indexed.
I've definitely gotten this to work before without relying on morph. The indexes for these functions are not consistent at all so remember that.

I vaguely remember relying on an Orb ability that enabled Attack Index 2.
 
Top