Math help with possible Array solution

CapitalGamesCapitalGames Member Posts: 5
edited November -1 in Working with GS (Mac)
Hi all, I am trying to hack together an array that can be accessible from scene to scene. I saw another post about creating an array that used an actor to store it, but that won't be kept from 1 scene to another. My idea for a simple array is to just use an Index attribute and store each number (0-9 max) in a different digit place. So if I wanted to store the numbers:

1, 7, 3, 2

I would make the index attribute = (1x1000)+(7x100)+(3x10)+2

So I would now have 1732 as the value of the attribute. The problem is how to get the numbers out, that's where my math skills fall short :(

Say I want to get the 3rd place number, what calculation would get me that value?

-J

Comments

Sign In or Register to comment.