Image URL from Array

Get help using Construct 2

Post » Mon Jun 24, 2013 10:38 am

Hey everyone,

I'm having trouble importing an image from an url stored in an array.
In fact I'm not even sure that the URL is stored in the array.

Here's the capx : Url to array problem

The images URL are stored in a .XML file and are imported with Ajax.
Then it should store the URL data in the array but it doesnt seem to work.

Anybody have a clue about this ?
Problem with storing text into an array ?
B
8
S
3
G
2
Posts: 35
Reputation: 2,176

Post » Mon Jun 24, 2013 10:41 am

@Shapter You should put the file public, can't access your capx ^^
B
17
S
8
G
4
Posts: 461
Reputation: 6,147

Post » Mon Jun 24, 2013 12:07 pm

Oops !
Sorry about that!

Here's the file : Here
B
8
S
3
G
2
Posts: 35
Reputation: 2,176

Post » Mon Jun 24, 2013 12:36 pm

@Shapter Ok, so the problem is that you try to assign a value to the array in a "ForEach in the Array" condition, but the value isn't accessible right now : you have to do your assign in the "ForEach in the XML" condition.

Here is the same example, working. I deleted what wasn't useful.Guizmus2013-06-24 12:36:39
B
17
S
8
G
4
Posts: 461
Reputation: 6,147

Post » Mon Jun 24, 2013 12:54 pm

Hey !
Thank you !
I didnt know how to use the loopindex expression but you my good sir have taught me much with a simple example !

I'm making games but have no coder background so help like yours is invaluable to me. Thanks again !
B
8
S
3
G
2
Posts: 35
Reputation: 2,176


Return to How do I....?

Who is online

Users browsing this forum: Darth Crusher and 3 guests