I am creating a hex based, static map by pasting hex shaped sprites on a very large drawing canvas. The hex shaped sprite has one animation with a number of different frames, each frame representing different terrain. Before pasting each sprite, I get the current terrain type from another object, change the current animation frame of the sprite to the correct number and then paste it to the canvas.
Here is a simplified example code for pasting a column of hexes (instead of getting the correct frame from the world map, I simply calculate it from the current row):
+ System: For "CurrentRow" from 0 to RowsNeeded
-> Hex: Set position to (CurrentColumnCenterX, LoopIndex("CurrentRow") × Self.Height + RowOffset)
-> Hex: Set animation frame to LoopIndex % Hex.AnimationFrameCount
-> HexMapCanvas: Paste object Hex without effects
Everything works fine, except that all hexes in the map are the same. They all turn out the same way as the last hex of the last column. There is a warning on the Paste object action stating that: "If an object is destroyed the same tick that you paste it, it will not be drawn, since drawing happens at the end of the tick." I assume that this also is the reason for all pasted objects looking the same, and therefore this is the intended behaviour and not a bug. Is that correct? In that case I have a workaround for this.