Page 1 of 1

SetSpriteOrigin / Matrix Questions

PostPosted: Oct 23, 2004 @ 8:59am
by sponge

PostPosted: Oct 23, 2004 @ 7:41pm
by kornalius
For origins, you should use:

SetOrigin(X, Y); To move the screen around.

SetSpriteFixed(sprite$, true); The sprite won't move with the virtual screen, it will always stay at the X,Y position on the pda screen. This is very usefull for user interface sprites. They always stay on the screen even though the screen origin is changed.

Matrices in PPL can be used like this:

m$ = [10, 20, [30, 40]];
ShowMessage(m$[2][1]); // 30;

PostPosted: Oct 24, 2004 @ 12:23am
by sponge

PostPosted: Oct 24, 2004 @ 2:59am
by kornalius

PostPosted: Oct 24, 2004 @ 3:19am
by sponge

PostPosted: Oct 24, 2004 @ 3:48pm
by kornalius

PostPosted: Oct 25, 2004 @ 3:33am
by sponge
kornalius: How would foreach handle the matrix like the above? It doesn't seem to even render the first row of tiles correctly.

I may just give up a little flexibility and go with a different array for each row, and hardcode a max height.