• 🏆 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!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

How do you stack your potions with full inventory

Status
Not open for further replies.
Level 4
Joined
Mar 5, 2006
Messages
46
My triggers to stack charged items works just fine but how do i do what icefrog did in dota.

How do you stack items when im buying an item with a full inventory? I cant even find the right event handler because the usual 'sold item and acquired items' dont work with full inventory.

thanks
 
Level 15
Joined
Aug 11, 2009
Messages
1,606
My triggers to stack charged items works just fine but how do i do what icefrog did in dota.

How do you stack items when im buying an item with a full inventory? I cant even find the right event handler because the usual 'sold item and acquired items' dont work with full inventory.

thanks

He creates a "power-up" version of it.Sort of dummy...
I don't know if you understood me,but he is making the other time something like tome.
Thus when you buy another item that it is already in your inventory it goes there.
 
Level 14
Joined
Mar 4, 2009
Messages
1,156
I know one way but you will need dummy item for every potion
dummy item would be like gold coin or like a book of strength/agility/intelligence/experience
(i thin you just need to set "automatically used when acquired - true"

than when unit acquires a dummy item create YOUR ITEM and give it to TRIGGERING UNIT

...or try

go in your shop>items made>put your potions there
 
Level 3
Joined
Oct 30, 2009
Messages
49
Basically just make an item based off a tome (ie: tome of power, tome of agility, tome of strength, etc.)
Then write a trigger so that if the unit aquires the item, and has none of item 'x' in their inventory, and they have an empty slot in their inventory, it gives them item 'x'.
If the unit has item 'x' then increase number of charges by '1'
 
Level 14
Joined
Mar 4, 2009
Messages
1,156
Basically just make an item based off a tome (ie: tome of power, tome of agility, tome of strength, etc.)
Then write a trigger so that if the unit aquires the item, and has none of item 'x' in their inventory, and they have an empty slot in their inventory, it gives them item 'x'.
If the unit has item 'x' then increase number of charges by '1'
lol,you can´t do that coz hero will not be able to acquire an item with full inventory so trigger will not run -.-

anyway i think you should use MortAr-´s suggestion,but i think that it may only work for picking up items on ground,not buying them

if you use my suggestion you should also create variables (if you have a lot of items

variable type: item type

DUMMY ITEM [1] = POTION OF MANA
DUMMY ITEM [2] = POTION OF HEALING
REAL ITEM [1] = POTION OF MANA
REAL ITEM [2] = POTION OF HEALING

> unit acquires an item

for each integer from 1 to 2 do actions
IF
item being manipulated equal to DUMMY ITEM [Integer A]
THAN
create REAL ITEM [Integer A] and give it to (triggering unit)

> unit loses an item

for each integer from 1 to 2 do actions
IF
item being manipulated equal to REAL ITEM [Integer A]
THAN
------------------------------------------
remove item being manipulated
OR
set life of item being manipulated to 0
OR
hide item being manipulated and remove after real is created
------------------------------------------
create DUMMY ITEM [Integer A] at position of item being manipuleted
 
Status
Not open for further replies.
Top