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

custom item system - equipping trouble

Status
Not open for further replies.
Level 3
Joined
Jan 15, 2010
Messages
47
Hello all,

I am trying to make a vJass multiboard inventory system. I am trying to come up with a way to "equip" an item. I would like to have it such that the hero picks up an item, and then if the player clicks the item, it is "equipped". The item wont have any stats on it, I just need to be able to get the item ID from it and i'm not sure. I have tried copying several abilities and giving it to an item, but I can't seem to get it to do anything in game. Hero can pick up the item, but clicking it does nothing.

How would I go about this? How should i make an ability to give to an item to "use". I am trying to avoid making charged items. All that I need to recover from the item is the item ID, and then I will destroy it and change stats based on my custom stat system. I am also unsure of what event would be used, whether it would be an item is used, or a unit starts casting an ability, or a unit starts the effects of an ability, or even a unit finishes casting an ability.

Any and all help/suggestions would be appreciated. Thanks :)
 
You will just need a Channel-based ability, with no effects of course and switch the order strings for each one of them, so that they do not interfere with each other. Your item should of course have the field Stats - Actively used = true. The event would be E EVENT_PLAYER_UNIT_USE_ITEM.
There are plenty of inventory systems, you might want to check on them (in the Spells section) before you start off your own.
 
Level 3
Joined
Jan 15, 2010
Messages
47
Ok thanks. I've already got my own custom system with several additional stats working, so the item system is just a storage system that changes those stats :)

Edit: I am using the EVENT_PLAYER_UNIT_USE_ITEM event now, but I think I am making the channel-based ability wrong. I have everything set to 0, except casting time and durations set to 0.01. However, when i use the item with the ability, the hero freezes up... sort of. All the command buttons go away and i cant click on the item or drop it.

Edit2: Solved >< Not exactly sure what i changed, but it works now. Thanks
 
Last edited:
Status
Not open for further replies.
Top