Array named from String

  • The first part of my program has a user enter their name, which is saved as CharName variable.

    I want to create a new Array with the name CharName, during a click event, but I can't figure out:

    1) How to create a new Array during an event.

    2) How to edit the Name field of the Array to make Array.Name = CharName

    Any ideas?

  • 1) You can just create array object in editor (it will be usable automatically), or you can spawn new instance of the array object via 'create object' if necessary. Spawning new instances of arrays is rarely needed though.

    2) This tutorial covers the basics for using arrays in C2

    Hope this helps :)

  • Thanks vee. I think I was under the assumption that Arrays were stored and saved in separate files for later use. It appears they are not.

    I eventually want my program to store and retrieve info from an outside database. Is that possible? I imagine with Facebook integration, they are accessing server data at least a little bit.

    If you can't within Construct 2, is it possible to add Python integration into your program?

    I guess I'm a little confused about how to save and access data from other files.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks vee. I think I was under the assumption that Arrays were stored and saved in separate files for later use. It appears they are not.

    I eventually want my program to store and retrieve info from an outside database. Is that possible? I imagine with Facebook integration, they are accessing server data at least a little bit.

    If you can't within Construct 2, is it possible to add Python integration into your program?

    I guess I'm a little confused about how to save and access data from other files.

    Accessing database would be done via AJAX calls / PHP script. I recall seeing some examples of that available so be sure to look into manual/tutorials/forum search on those topics! :)

    If you are looking to access some data, I'd also recommend looking into XML / JSON which are both supported.

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