• Check out the results of the Techtree Contest #19!
  • 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 void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Removing and inserting weapons

Status
Not open for further replies.
Level 9
Joined
Jun 7, 2008
Messages
440
I have a hero (dwarf) that has three abilities. Axe, Sword, Hammer.
When he clicks on one of these abilities I wanted the current weapon of choice to be displayed, corrisponding to the skill he has on. Axe for axe, sword for sword, e.t.c. Im stuck on how to remove/add weapons to his left and right hands. :( As well, Do i need a model of a hero with no weapons or is it possible to remove the weapons of a hero, like Illidans duel-blades?
 
You need to have a model without a weapon.
Then make the trigger (this is just theoretically)

Event:

A unit begins casting an ability

Action:

If Ability being cast = Axe
Destroy "CurrentSpecialEffect"
Then Create a specialeffect to the right hand of "Your Unit" using Axe.mdx
Set "CurrentSpecialeffect"= Last Created Special Effect

If Ability being cast = Sword
Destroy "CurrentSpecialEffect"
Then Create a specialeffect to the right hand of "Your Unit" using Sword.mdx
Set "CurrentSpecialeffect"= Last Created Special Effect

If Ability being cast = Sword
Destroy "CurrentSpecialEffect"
Then Create a specialeffect to the right hand of "Your Unit" using Hammer.mdx
Set "CurrentSpecialeffect"= Last Created Special Effect

"CurrentSpecialEffect" is a SpecialEffect variable

I hope this helps you
 
You can also create passive abilities that use the model (for example; using brilliance aura) Change the target of the ability to 'self' and change the model for the effect to 'axe.mdx' or whatever your model is.
Then just create a simple trigger like:
Events: Unit finishes casting an ability
Conditions: Ability being cast = axe
actions: add ability to triggering unit "Axe Passive"

This will also let you give bonuses based off the weapon that your hero is weilding.
 
Status
Not open for further replies.
Back
Top