Quote:
Originally Posted by fowlplay4
Get the tile data: this.level.tiles[tx, ty]
Use these functions:
PHP Code:
gettileset(); // returns the current tileset image
//credit to dusty
function TilesToImage(t) {
if (t.type() == 0) {
temp.px = (int(t%16)*16)+(int(t/512)*256);
temp.py = (int(t/16)*16)%512;
return {px,py};
} else if (t.type() == 3) {
temp.imgarray = new[0];
for (temp.i : t) {
temp.px = (int(i%16)*16)+(int(i/512)*256);
temp.py = (int(i/16)*16)%512;
imgarray.add({px,py});
}
return imgarray;
} else return -1;
}
use stretchy = -1; to flip an the tile image.
Just make your mirror image dimensions match the tiles so you don't have to do any clipping.
|
Thanks, tiles show now!! Just gotta make them appear in correct spot now.
edit: I got everything to work but just looks weird to me.
Only problem I have is only yourself will show on mirror and when you swing your sword the gani doesn't play fully.