How do add keys with certain value in dictionary to an array?

0 favourites
  • 2 posts
From the Asset Store
Customize the animation of character when item changed
  • I am trying to create a football transfer list but I simply can't get past this issue.

    I have a dictionary where the keys are the players names, and the values are to show if they are listed for sale or not ("True" means they are for sale).

    I want to create a list of all the players on transfer list, so I created an array (TransferList).

    So, for each player (key) that has the value=True (means they are for sale), the player is to be added to the Array "TransferList".

    I've added some text debugging that is working, but nothing happens on the Array.

    Can somenone help me here, as I am stuck without mercy here...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This way you're doing you'll always add the player name at index 0. You may want to use Push instead, just don't forget to verify if this player is already in the list or not, for that you can use the array action Contains Value.

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