Using imported files

Get help using Construct 2

Post » Wed Dec 19, 2012 12:13 am

Hi,

Is there a way I can use imported files? I'm trying to import a .xml or a .json directly to Construct 2 by clicking the files folder and importing it, but what would be the path to use it? Is this even possible?

Thanks.
B
114
S
38
G
40
Posts: 820
Reputation: 27,262

Post » Wed Dec 19, 2012 3:15 pm

Using project files in Construct 2

You can AJAX request the files. They are in the same directory as index.html, so you can access them by their name alone (e.g. "file.xml").
Scirra Founder
B
373
S
218
G
83
Posts: 23,432
Reputation: 185,794

Post » Wed Dec 19, 2012 4:15 pm

oooohhhh, just commenting. That will help me work on my metroidvania rpg like game in 6 or so months when I get started :D I was wondering how I was going to handle conversation scripts. This is good :)
B
88
S
18
G
9
Posts: 2,455
Reputation: 14,928

Post » Wed Dec 19, 2012 7:53 pm

Thanks!
B
114
S
38
G
40
Posts: 820
Reputation: 27,262

Post » Tue Jan 29, 2013 3:39 am

[QUOTE=Ashley] http://www.scirra.com/tutorials/328/using-project-files-in-construct-2

You can AJAX request the files. They are in the same directory as index.html, so you can access them by their name alone (e.g. "file.xml").[/QUOTE]

I can't request the files form URL (e.g. "http://127.0.0.1/image/p001.jpg")
B
6
S
1
Posts: 3
Reputation: 649


Return to How do I....?

Who is online

Users browsing this forum: bilgekaan and 1 guest