Array named from String

Get help using Construct 2

Post » Tue Jan 29, 2013 8:04 am

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?
B
7
S
4
G
1
Posts: 7
Reputation: 1,341

Post » Tue Jan 29, 2013 8:12 am

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 :)
B
24
S
8
G
7
Posts: 756
Reputation: 7,192

Post » Tue Jan 29, 2013 8:27 am

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.BrandonJAwesome2013-01-29 08:28:06
B
7
S
4
G
1
Posts: 7
Reputation: 1,341

Post » Tue Jan 29, 2013 8:32 am

[QUOTE=BrandonJAwesome] 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.[/QUOTE]

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.vee412013-01-29 08:33:05
B
24
S
8
G
7
Posts: 756
Reputation: 7,192


Return to How do I....?

Who is online

Users browsing this forum: heliogame and 16 guests