• 🏆 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!

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?
 
Level 31
Joined
Apr 17, 2009
Messages
3,571
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
 
Level 3
Joined
Oct 30, 2009
Messages
49
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.
Top