So mines pretty simple, not sure if it is the most efficient method. runs smooth on my S3.
First I setup if the Black Tile touched is the lowest Instance UID, as you can't touch any other black tile until the lowest is touched first.
Set instance vars on black tile: IsLowestUID = bool false. InstanceUID = 0
BlackTile object - Pick Instance with lowest IsLowestUID -> set IsLowestUID to True
Else
Set to IsLowestUID False
Create GameMode global var as text.
Create GameOver global var as number=0
Create ClassicMoveTiles global var as number = 0.
Then on touch blackTile:
On Touched BlackTile and BlackTile Is IsLowestUID and GameOver=0->
Subevent ->
GameMode ="Classic" -> set ClassicMoveTiles = 1
System Every Tick ->
Subevent ->
GameMode="Classic" and ClassicMoveTiles=1
-> set y to background.y + tilespeed
-> set y to blacktile.y+ tilespeed
-> set y to whitetile.y + tilespeed
Subevent again ->
Background y>=0 -> set ClassicMoveTiles = 0
-> set background y to -195.1 (this value depends on your bkground object position, have to play around)
-> call GenerateTiles function.
On touch WhiteTile and gameover =0 with trigger once -> set whitetiletapped=1 and gameover=1 (or call your gameover code)
If they didn't hit a whitetile and just missed the black tile past the screen, flash the tile they missed:
System Gameover=1 and whiteTiletapped=0 -> set y to background.y-200. set blackTile to blacktile.y-200, set whitetile to whitetile.y-200
subevent -> blacktile pick instance with lowest InstanceUID -> blacktile flash
hope that all makes sense i've quickly typed it out. pm if need any other help dude.
cheers