How do I load objects and data from a file?

Get help using Construct 2

Post » Thu Jul 21, 2016 8:15 pm

I need to place objects on coordinates indicated in a separate file. I also need to record text and numbers to the variables of objects from the file.
Should I use XML files and plugin? Any tips, tuts or capx?
B
20
S
4
Posts: 51
Reputation: 1,104

Post » Fri Jul 22, 2016 12:55 am

XML sounds like the way to go.

https://www.scirra.com/tutorials/search?q=xml

Parse it into an array, and you'll have all the information available to you for use.

Although you can't dynamically create object types at runtime, you'll have to set those up ahead of time.
Mistakes were made.
B
52
S
26
G
109
Posts: 1,606
Reputation: 61,633

Post » Fri Jul 22, 2016 2:23 am

What platform are you developing for? If you're doing mobile then xml is probably best... if you're using nwjs then using a dictionary saved as json works well.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
83
S
34
G
40
Posts: 3,032
Reputation: 30,474


Return to How do I....?

Who is online

Users browsing this forum: AllanR, BackendFreak, farsen, R0J0hound and 29 guests