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

Item system (+1 inv slot)

Status
Not open for further replies.
Level 8
Joined
Sep 18, 2011
Messages
195
Hi,
I was thinking about making an item system in gui/jass whatever, but I am not sure what to think of.
I want to make a system similar to (DotA) item system, but I am wondering how the creator removed the displaying message "Inventory is full".

I searched for this but everyone says that each item has a referring item but meant to be a rune (or powerup) version of it, then they are sorted in array with their IDs...

but I am thinking of the following series of actions:
- When the unit is issued an order targeting an object (which is an item) then stop the unit's order and make it move to the item's position.
- Using a unit indexing system, the unit now holds a boolean that tells the unit is going to get the item.
- When the unit is near enough the item, it picks it up (or it fires a trigger that manages recipes).

and:
- If the unit is issued another order, set the boolean to false.
- presuming that I have removed the custom text: "Inventory is full" and imported a "human inventory full" wav sound that is silent...

so... is this an efficient way, can this actually be used in dota, is there a better full system for this here in the hive??

Thanks for reading.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
DotA uses tome system to buy their own items, must consist of some huge setup is involved.
But the base, is when the Inventory is full, the bought item is a tome.

Because, if you take a look, Tome such as Tome of STR/AGI/INT does not take up slots when you buy them instead just adding your stats, is it ?

Try use tomes, therefore the "Inventory is full" message won't appear even you have full inventory.

And when that item is usually the last recipe for your combine item, it will drop either random or fixed slot item (not related to the recipe item) and put them together and take those items back to keep intact to the heroes.

The process is complicated or sounds many action is involved, but believe me, it's faster than your eyes can see it.
 
Level 5
Joined
Dec 25, 2011
Messages
45
DotA uses tome system to buy their own items, must consist of some huge setup is involved.

As far as i am concerned the system is not that difficult to create, you just spend more time on it.

I heard that they use dummy units for it...
it means when you click on a item in dota, you actually buy a dummy unit (thats why thers no error message regarding the inventory maximum)

So u go to your trigger and do something like:

-Unit is sold-
if inventory of hero isn't full -> add item to hero
if inventory is full -> place item at circle of power

Thats why you can combine items in dota while they would actually move to your circle of power :D
 
Level 11
Joined
Aug 25, 2006
Messages
971
I noticed that too, but I am just trying to learn jass...
so could it be that there are new imported war3 mechanics (natives) to the game?
or just a script/system.

It is just a script system.
Jass (Actually Jass2) is just a scripting language. The GUI creates scripting commands automatically, that's how it works. Unfortunately it does so in a very inefficient manner. Coding in pure Jass allows you to write script that the GUI could never generate. This allows for tighter faster triggers that could do more.

vJass does not add functionality to warcraft 3 that did not exist before vJass. However it provides a variety of programming techniques which help save a significant amount of time and make interfacing different parts of your jass much easier.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
As far as i am concerned the system is not that difficult to create, you just spend more time on it.

I heard that they use dummy units for it...
it means when you click on a item in dota, you actually buy a dummy unit (thats why thers no error message regarding the inventory maximum)

So u go to your trigger and do something like:

-Unit is sold-
if inventory of hero isn't full -> add item to hero
if inventory is full -> place item at circle of power

Thats why you can combine items in dota while they would actually move to your circle of power :D

Both Unit Sold and Tome-based items can be used here.
Because basically, both of them is "sell-based" method.

You can either Sell Unit or Sell Tomes (+0 stats)
 
Status
Not open for further replies.
Top