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

2 item classes, melee and ranged

Status
Not open for further replies.
Level 5
Joined
Aug 27, 2010
Messages
79
Hello,

I have 2 item classes, WeaponMelee, WeaponRanged...
Weapons get added only through WeaponMelee...When i equip a WeaponRanged item nothing happens...If i change the item class of that item to WeaponMelee, it works...

Also how to display 2 weapons on a hero???
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,191
Weapons get added only through WeaponMelee...When i equip a WeaponRanged item nothing happens...If i change the item class of that item to WeaponMelee, it works...
I think that behaviour is intended. For all the game knows you are trying to place a type B in a type A socket so does not allow it. Try making both the same item class seeing as you are trying to use them in the same slot.

Also how to display 2 weapons on a hero???
I do not think this is possible with the standard UI. It might be possible by using a custom layout for the UI.
 
Level 5
Joined
Aug 27, 2010
Messages
79
Am sorry i forgot to mention, i have 2 different slots for the 2 types...Both are shown as equiped in equipement screen(created by following PhantomTap's tutorial)...
What i intend to do is, have a melee weapon equiped which is used when target is close, if target is far, ranged weapon is used(it workes when i add 2 weapons directl 2 units).
 
Level 5
Joined
Aug 27, 2010
Messages
79
i did that....it is working....
my problem:
i have 2 item classes WeaponMelee, WeaponRanged, 2 different slots for each...
only the WeaponMelee class is adding the weapon...the problem is not in the item, cos when i changed the class of a WeaponRanged to WeaponMelee it worked....

Here's the Map...

View attachment test.SC2Map

Edit: Got it....Had forgotten to enable equip for that slot....
Sorry for wasting your time!
 
Last edited:
Status
Not open for further replies.
Top