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
106
S
35
G
36
Posts: 792
Reputation: 24,703

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
357
S
214
G
72
Posts: 22,946
Reputation: 178,228

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
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Wed Dec 19, 2012 7:53 pm

Thanks!
B
106
S
35
G
36
Posts: 792
Reputation: 24,703

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: anty21ro, fr0z3n, LeFuji, RookieDev, TRMG and 14 guests