0 Favourites

Loading arrays from spreadsheets, .xml or .csv

This forum is currently in read-only mode.
  • Hey everyone.

    I'm been somewhat of a long term user of clickteam products, and I'm just about convinced to make the switch to construct. Using MMF2, there is a dynamic array extension that allows you to load an array from a .csv file, as well as a user that created a program to turn .xml files into a 3D array. I was just wondering if anything like that existed with construct?

    Also, a bonus question, has the ability to change controls at runtime been implemented as of yet?

    Other than that, I am very pleased by what I'm seeing so far, honestly it trumps MMF2 on most of the issues I've had with it so far.

  • There's no plug made for that specifically, but if you can open it in notepad you can get the data with the Text Manipulator object.

    The wiki has some info on expressions using text as well.

    http://sourceforge.net/apps/mediawiki/construct/index.php?title=System_Expressions

    Also there are a couple of unfinished plugs for changing controls

    sglors has one

    http://www.scirra.com/forum/viewtopic.php?f=33&t=7511

    And lucid has one floating around somewhere.

  • Thanks, that should get me a push in the right direction! It's a shame that neither clickteam or scirra has come up with a way to just 'edit' an array in the editor. But either way, I should be able to make due. Thanks again!

  • Hey Horrendous Games newt this might help:

    This is a basic example of loading in CSV data into an array. capx

    The Idea: The user types in a date from the 'DATE' column, eg.'1 Jan 1942'. The programm will then bring up a fact and load the associated image from a URL. Iv added a randomise button that uses the array to randomise a URL.

    <img src="https://dl.dropboxusercontent.com/u/20299415/capx-forum/Pictures/facts-spreadsheet.png" border="0">

    My Process: I made a spreadsheet via google docs, downlaoded it as a CSV file and then copied the CSV spreadsheet data and pasted it into the CSV plugin (you probably can load in the CSV doc instead of pasting data into C2)

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

    Would you guys happen to know how to look up one of the facts by searching a date in the text box?

    Is the best way to load the 3 columns of data into the Array and write an expression in the Text Box with the logic of:

    When a "DATE" is detected in the Array:

    Sprite loads image from "URL" index of array.

    Text loads "FACT" from index of array.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • NECROKRIEG

    Why have you responded to a 3 year old thread in the Construct Classic section, with an answer for Construct 2?

  • zenox98 woops. Didnt realise the age. The thread seemed relevant as it was among more recent posts in my search. I'll re-post in How Do I. Had no idea this is a CC post

    Post Move Here

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