Retreive Information with Array

Get help using Construct 2

Post » Wed Nov 13, 2013 7:49 pm

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!
B
3
S
1
Posts: 2
Reputation: 430

Post » Wed Nov 13, 2013 9:08 pm

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
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 787
Reputation: 3,786

Post » Thu Nov 14, 2013 7:50 am

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!

B
3
S
1
Posts: 2
Reputation: 430

Post » Thu Nov 14, 2013 9:38 am

Look at the Plugin's topic, everything is covered there.
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 787
Reputation: 3,786


Return to How do I....?

Who is online

Users browsing this forum: plinkie and 25 guests