Fill Array with Tokenat

Forum Home Forum Home > Construct 2 General > How do I....?
 Post Reply Post Reply
Author
8,033 Rep
Post Options Post Options   Quote Zetar Quote  Post ReplyReply Direct Link To This Post Topic: Fill Array with Tokenat
    Posted: 17 Mar 2012 at 6:19pm

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
Try HEX'N AROUND in the C2 Arcade!
Back to Top
8,519 Rep
Post Options Post Options   Quote Weishaupt Quote  Post ReplyReply Direct Link To This Post Posted: 17 Mar 2012 at 6:36pm
Strange indeed! It seems, that the array is NOT set with the data from the list....
_____________________
You want help? Post your CAPX!

virtus junxit mors non separabit
Back to Top
11,752 Rep
Post Options Post Options   Quote Yann Quote  Post ReplyReply Direct Link To This Post Posted: 17 Mar 2012 at 6:57pm
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") )

Edited by Yann - 17 Mar 2012 at 6:58pm
Back to Top
8,033 Rep
Post Options Post Options   Quote Zetar Quote  Post ReplyReply Direct Link To This Post Posted: 17 Mar 2012 at 8:23pm
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.
Try HEX'N AROUND in the C2 Arcade!
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down