Moving Tiles
by Jeremy Easoz · in Torque Game Builder · 06/12/2008 (11:03 am) · 3 replies
I have a small tile layer and some of the tiles in various places are removed.
All tiles above the removed, I want to collapse and push them down the grid
Is there a function that allows you to move tiles?
Or do I have to read all tiles above and re-drawn them myself?
All tiles above the removed, I want to collapse and push them down the grid
Is there a function that allows you to move tiles?
Or do I have to read all tiles above and re-drawn them myself?
About the author
#2
Just a row and move it down.
Kinda like tetris, when you make a line the blocks drop down.
Well when an individual block is destoryed I want to move everything in the column above down
06/13/2008 (5:39 am)
Yeah I don't want to move the whole layer.Just a row and move it down.
Kinda like tetris, when you make a line the blocks drop down.
Well when an individual block is destoryed I want to move everything in the column above down
#3
06/13/2008 (8:52 am)
You will need to use a loop and operations on individual tiles to do that.
Torque Owner Ehrlich
use %obj.setAutoPanX(%value) or %obj.setAutoPanY(%value)if you wanna get the tiles moving in the X or Y axis... %value is the speed at whch the tiles are gonna move.
now, if you want the tile to repeat (loop the movement) itself forever, use this:
%obj.setWrapX(true) or %obj.setWrapY(true) to enable wrapping in the X or Y axis respectively...
hope it was what you were looking for.