Creating a dynamic list of items based on rows and data in array

0 favourites
  • 3 posts
From the Asset Store
Data+ is the best Data Management solution for Construct 3. It contains 4 Addons (Plugin & Behavior).
  • I have been trying to figure this out all day.

    I have an array of data, with rows with info, its going to be long. Each row has three columns.

    • Name
    • Description
    • Value

    And based on this array I want to create a list of buttons, one for each row in the array, with the Name, Description, and Value on each button.

    I have created a Template with the button sprite and the text elements, and I can create the template object with hierarchy on start of Layout, and get the first row of data from the array.

    But all my atemtpts to to then generate the the rest of the buttons based on the rows in the array have been futile. And have each button under each other. (Creating a scrollable list is the next issue, but that's for another day)

    If you have a solution to this, please share a screenshot of an event sheet.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hi.

    I recommend that you always wait for the end of download signal.

    When you loop through the elements in an array, instead of “loop-index” you should use “correct-value” as in the screenshot.

    paste.pics/0712f10f9f01983634f5644488a16bac

  • Your solution didn't work out of the box, but that's because you didn't knew my project. but you gave me the final info to figure it out with some adjustments.

    Thank you so much!

    I will post the result here for everyone to see that have the same problem. There was no one explaining it in a easy way, and no tutorials on the tube covering this.

    The result is exactly as simple as I thought it would be, now I just need to replace the local array with a remote backend API call.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)