How do I dynamically change the name of a XML file.

Get help using Construct 2

Post » Sat Jul 11, 2015 12:58 pm

I split the levels configuration in different XML files. The problem is that I will have 100 different levels (and XML files) and I don't want to copy the same line of code 100 times.

Image

I want to dynamically change the name of the XML file that I want to read.
B
15
S
6
Posts: 105
Reputation: 1,356

Post » Sat Jul 11, 2015 2:30 pm

try:

AJAX Request URL..... "Level"&iLevel&"Data.xml"(tag"LevelData")
B
66
S
24
G
7
Posts: 1,514
Reputation: 11,039

Post » Sat Jul 11, 2015 3:28 pm

The problem is that the File Parameter for the Ajax Request function is a drop down menu:

Image
B
15
S
6
Posts: 105
Reputation: 1,356

Post » Sat Jul 11, 2015 3:56 pm

korbaach wrote:try:

AJAX Request URL..... "Level"&iLevel&"Data.xml"(tag"LevelData")



Image
Last edited by korbaach on Sat Jul 11, 2015 5:47 pm, edited 1 time in total.
B
66
S
24
G
7
Posts: 1,514
Reputation: 11,039

Post » Sat Jul 11, 2015 5:35 pm

That worked! Thanks.
B
15
S
6
Posts: 105
Reputation: 1,356


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 16 guests