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

[Trigger] Advanced Multinventory!

Status
Not open for further replies.
Level 8
Joined
Jul 22, 2008
Messages
331
Advanced Multinventory! Not a noob!

OK. everyone saw inventory in Arkan's "Dark Invasion II"...
It goes like this... I created a Multiboard, I've setup the icons
for empty item slots. I have icons for items but problem goes like this:

my Hero picks an item, and it shows in multi inventory slot 1.
my hero picks another item and he shows in multi inventory slot 2.
My hero drops an item from slot 1, and picks another item. latest
picked item shows in slot 3, and i want it to be in slot 1. get it?


Then:
When i select item in my multinventory i want it to show me
details about that item... I know how to do that, but is there any
way that wont force me to write description for every map and have arrays
(if cloak of shadows in slot 1 set description "Bla bla puff",
if cloak of shadows in slot 1 set description "Bla bla puff",),
for every item, for every slot. ofcourse, this is the problem also with item
icons. is there any shorter way to solve this.



If I would sit and thin a little I would solve it but...
I'm over my head with my job and I have no time really...
Does Anyone can help me?
 
Last edited:
Level 11
Joined
Dec 8, 2006
Messages
334
Just set boolean variable, let we say, ItemSlot[1] = false
unit pick up item
if ItemSlot[1] == false then give it to multyboard slot 1, and set ItemSlot[1] = true
if ItemSlot[1] == true, check if ItemSlot[2] == false, and do all of this again

when unit drops an item from slot 1, set ItemSlot[1] = false


I hope you understand what I mean, if no, just tell :p
can't help with problem 2 right now, gotta go now, ciao :D
 
Last edited:
Level 8
Joined
Jul 22, 2008
Messages
331
but item slot is in multiboard... i know for that..
that would be easy. just to set a variable. maybe i didn't explained properly.
BTW: There are 25 item slots (sluts, I wrote first time)...
 
Last edited:
Level 11
Joined
Dec 8, 2006
Messages
334
ItemSlot is only a name for variable with type Boolean, that number in brackets is array
You can keep going until ItemSlot[25] :p
It's not only an easy "variable setting", this will always check if Item(multyboard)Slot[1] is empty first, if yes, it will give item to Slot 1, and that's all. If no, it will check if Item(multyboard)Slot[2] is empty, if it's empty, it will give item to slot 2, if no, it will check if Item(multyboard)Slot[3] is empty, and so on until slot 25

So it will fix your problem, I am almost sure it will work :p

Or maybe I explained it too bad, should I made an example?
 
Status
Not open for further replies.
Top