Search Box Feature: Fact File

Get help using Construct 2

Post » Tue Jan 14, 2014 3:41 pm

Hi.

I need a bit of help making a search box feature that loads a URL and a Fact. I'm using the CSV plugin and arrays. I'm at the stage where Iv placed the CSV data in an array and can load up images from Url's by pressing a button, but I'm not sure how to associate the'DATE's with the 'FACT' & 'URL' column so they're searchable.

Capx

The Idea: The user types in a date from the 'DATE' column, eg.'1 Jan 1942'. The programme will then bring up a fact and load the associated image from a URL.

This is the spreadsheet before it's converted to CSV format (comma separated values)


Iv made a primitive search feature that works but it will mean I would have to do everything manually. (Capx demos this)

What would be the best way to look up a fact by searching a date?

Is the best way to load the 3 columns of data (pic above) into the Array and write an expression in the Text Box with the logic:
When a "DATE" is detected in the Array:
> Sprite loads image from "URL" index of array.
> Text loads "FACT" from index of array.


I'm a bit lost on how to form an expression.
Thanks.NECROKRIEG2014-01-14 15:42:35
B
15
S
6
G
3
Posts: 87
Reputation: 4,304

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 30 guests