Okay, so I am working on a shovel. I am trying to make it place tiles in the level where I dig. I wan't them to wait so long then disappear. The problem is that they only seem to disappear if I replace the tiles for blank grass 2047 I think it is. If I place my tiles over any other tile they do not automatically disappear. Is there any trick to making the tiles revert after a set amount of time? I was thinking I could just re-replace the tiles but then it gets mad ugly when the player leaves the level because then your not in the same level and they don't end up getting reverted back ect.
PHP Code:
//#CLIENTSIDE
function onCreated() {
this.x = player.x + 1.0 + vecx(player.dir) * 2;
this.y = player.y + 1.0 + vecy(player.dir) * 2;
for ( this.iy = 0; this.iy < 2; this.iy ++ ) {
for ( this.ix = 0; this.ix < 2; this.ix ++ ) {
this.checkX = this.x+this.ix;
this.checkY = this.y+this.iy;
tiles[this.checkX, this.checkY] = this.replaceTiles[this.ix+this.iy*2];
}
}
updateboard(this.x,this.y,2,2);
}