How do I [Set Text to Array Data]

0 favourites
  • 5 posts
From the Asset Store
Easy to use shop and inventroy populated by an array!
  • I am trying to set text to array data i have looked at other similar posts but none of the information in them helped me with my problem,

    I am adding data to an array, X is being the name if the item and Y is being the quantity of the item.

    I want it to display as

    First item: First item amount

    Second Item: Second Item Amount

    For each xy element : Set text to Array.Curvalue just gives me the the amount of the first item and not the rest

    Any help would be greatly appreciated, Thanks

  • For each X: Set text to ",0)&,1)"

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey man, thanks for the quick reply

    This works for the first item i add to the array but does not add the 2nd line in when i add another X to the array

  • ah i see how that works now

    i have it working with 2 items like this

    For each X element : Set text to Array.At(0,0)&Array.At(0,1)&newline&Array.At(1,0)&Array.At(1,1)

    Is there a way i can set this on a loop or something so it will only show whats there, as right now this way it shows [ 00 ] for the item(s) that are yet to be added


  • Yes, you can use the text append action for utilization in a loop, where you use loopindex in place of your y value.

    Edit: with the condition that the current value is not 0.

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