0 Favourites

Retreive Information with Array

  • Hi, I need help with the following matters, please help!

    How do I import a database into construct?

    For example, can I create a 2 dimension array (width 2 and height about 50)with preset values and get my game to load the array when I start the layout?

    How do I get my game to retrieve specific values from my array?

    For example, in my puzzle game. The player need to key in a 4 digit number code. Upon entering the code, I want the game to search the above mentioned array in the first column for the code and then flash the corresponding text (word)

    Code Solution

    1234 X men

    4578 Bugs Bunny

    7865 Ferrari

    using the mock up, I want the game to show "X-men" when the player keys in "1234" as the code

    Will appreciate any Help I can get! Thanks!

  • 1) Look up the CSVtoArray Plugin, this is an easy way from spreadsheet to construct 2 imo.??2) array.at(x,y)??if you wanna search arrays, use compare value or for each x/xy/xyz. If you wanna select only certain rows / columns, use system compare: array.curx = x or array.cury = y and things along this line??????? and y being your indexes

  • Hi Mindfaq,

    Thanks for your help. Can you provide a step by step guide on how I should go about to import my CSV file into construct?

    I think I can figure the rest out on my own. Thanks!

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Look at the Plugin's topic, everything is covered there.

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