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

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 64
Joined
Jan 18, 2005
Messages
27,255
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