Wastrel
The second, with exception that C2 doesn't handle arrays in expressions, so you wouldn't want to get both values at once, unless you were doing something like setting text.
Ashley
Im not familiar with that formula, so I cant say for sure.
What it does offer is an order, say for example a path.
-+ for n = 0 to 1dimensionalarray.length
->sprite set x to lerp(sprite.x,1dimensionalarray(loopindex("n")).x,something*dt)
->sprite set y to lerp(sprite.y,1dimensionalarray(loopindex("n")).y,something*dt)
Course you would use some kind of timer with that as well, but you get the idea.
-+every n seconds set global.value("tcount")to clamp(global.value("tcount")+1,0,1dimensionalarray.length)
->sprite set x to lerp(sprite.x,1dimensionalarray(global.value("tcount")).x,something*dt)
->sprite set y to lerp(sprite.y,1dimensionalarray(global.value("tcount")).y,something*dt)
Or just something to sort things to predetermined positions:
-+For each sprite
->Sprite set x to 1dimensionalarray(loopindex).x
->Sprite set y to 1dimensionalarray(loopindex).y
To do stuff like that using the regular array is not real straight forward, as you would have to do a Boolean comparison, like is value at array(x,y)= 1, do stuff.
Problem is when doing it that way, its not easy to get the order straight.