Problem scrolling with depth enabled

i’ve been trying 2 get scrolling with depth enabled based on tonypa’s tile based tutorial bt had little success in doing so.

The prob is after adding the codes to add depth, i’m nt too sure as to hw i’m suppose to determined the position of the new tiles as the tiles scroll.

Any help would be much appreciated.