playMaker

Author Topic: array inside array / simple grid inentory [SOLVED]  (Read 1767 times)

Kaikoura

  • Playmaker Newbie
  • *
  • Posts: 23
array inside array / simple grid inentory [SOLVED]
« on: April 08, 2023, 05:07:38 AM »
hey,

I try to setup a simple grid inventory. I have a 3x3 grid. I made an array for each horizontal row( row1, row2, row3). These can be navigated left and right by decreasing or increasing the row index.
For navigating up and down, i want to store the arrays in an array and add or subtract the Index to select the right horizontal row.
I added Arraymaker, but I get an error if I try to store an array.





Is it not possible to store arrays inside an array? If you have a better solution for I want to achive I´m happy to hear it. Thanks!
« Last Edit: April 11, 2023, 12:04:49 PM by Kaikoura »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: array inside array / simple grid inentory
« Reply #1 on: April 08, 2023, 08:50:08 AM »
Hi.
Have you tried the Array List Table component? :)


Kaikoura

  • Playmaker Newbie
  • *
  • Posts: 23
Re: array inside array / simple grid inentory
« Reply #2 on: April 10, 2023, 03:40:35 AM »
thanks,
I tried the array table component now, though I´m not 100% sure how to set it up.
Currently I only get items from the first row. Is this not how you set it up?:



if I try to get item 1 of row 2, I get item 3 of row 0.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: array inside array / simple grid inentory
« Reply #3 on: April 10, 2023, 06:53:57 AM »
Hi.
The actions will all start and not wait till they are finished.
Creating the rows might not be finished before the Array Table Get is started.

Try setting the Array Table Get in a separate state.

If your table is a fixed size its better to setup the table in edit mode,
if there is a max row/collums you could still preset and in you fsm you can set a limit

Kaikoura

  • Playmaker Newbie
  • *
  • Posts: 23
Re: array inside array / simple grid inentory
« Reply #4 on: April 11, 2023, 12:03:48 PM »
Thanks, it works now.
I was just confused as I had to make a new gameobject with an array List Proxy component for each column.
I´ll happily sort my items now ;)