Fill Array with Tokenat

Get help using Construct 2

Post » Sat Mar 17, 2012 6:19 pm


So, I am trying to figure out how to use the Token features and place them into an array.   I created a global variable {ArrayData} holding the token data like this: "0,1,2,1,2,0,2,1,3".

I then want to store this into an array that is 3 X whatever length the tokencount is divided by 3. The array is only 3 wide.

Then to test it, I want to create text boxes to show the values in each position of the array.   

To me, the capx below should do this. WHAT DID I DO WRONG!   

Thanks in advance forum buddies!

CAPX
B
192
S
6
G
7
Posts: 213
Reputation: 10,178

Post » Sat Mar 17, 2012 6:36 pm

Strange indeed! It seems, that the array is NOT set with the data from the list....
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Sat Mar 17, 2012 6:57 pm

Nothing wrong with your events.
It's just that... The Array object isn't in the layout.

(as a side note you don't need the TokenVar variable you can just use loopindex("Y")*3+loopindex("X") )Yann2012-03-17 18:58:22
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Sat Mar 17, 2012 8:23 pm

Thanks @Yann. I hate it when it is so simple...

About the TokenVar... GREAT IDEA, and a event saver at that. @Yann, you are invaluable to this forum.
B
192
S
6
G
7
Posts: 213
Reputation: 10,178


Return to How do I....?

Who is online

Users browsing this forum: zenox98 and 22 guests