In the game I'm currently creating I have a level loader that loads in the levels I create in the native frame editor. What I would like to do is have the "floor blocks" change their sprite to be either an left end piece, middle or right, etc., based on their position and other blocks around it. Not sure of the best way to describe it, haha.
I thought using an array would work and could get it to store the positions of all the blocks. However I can't seem to the get it loop through all the blocks on level load and read from the array.
The example below is sort of what I want, but have it load at start of frame with the blocks already there, rather than "drawing" it on the screen at runtime.
Anyone got ideas?