Help retrieving items for multiboard inventory system?

Status
Not open for further replies.
EDIT: ok heres what I'm trying to do right this very moment.
Im working on the trigger where an item is acquired. It then needs to save the item's POSITION in the multiboard, so it doesnt overwrite other items. and then, it needs to be able retrieve etc. But for now im worried about saving.

hmm... I should probab;ly rephrase the question :grin:. I have a way to retrieve the 10 multiboards easily. I'm looking for a way to store the items, and then be able to retrieve them one at a time easily. one of the hard ways i mentioned could be an array of 12 for each player. Maybe if i used hashtables?
 
Hashtables can be your solution, yes. You can have an increasing integer, when a unit acquires an item and save it to the unit.
  • Trigger
  • Events
    • Unit - A unit acquires an item
  • Conditions
    • (Load (Key(
  • Actions
    • Set Int = (Load (Key(integer)) of (Key(Triggering unit)) in Hashtable)
    • If (All conditions are true) then do (Actions) else do (Actions)
      • If - Conditions
        • (Int) Less than 12
      • Then - Actions
        • Hashtable - Save (Int + 1) as (Key(Int)) of (Key(Triggering unit)) in Hashtable
        • For each (IntegerA) from 1 to Int, do (Actions)
          • Loop - Actions
            • Hashtable - Save (Item being manipulated) as (Key((items)+(String(IntegerA))) of (Key(Triggering unit)) in Hashtable
(Key((items)+(String(IntegerA))) is "String ID", not "Handle ID" (when it asks you to type a Key, the default one is "Handle ID"; scroll to "String ID" instead). When you get to String ID, scroll to "Concatenate Strings". In the first string field type "items" and in the second, scroll to Conversion - Convert Integer to String and get "For Loop Integer A".
 
Status
Not open for further replies.
Back
Top