Hi, my aim on my server is to make it like Terraria.
Iv'e built a weapon to destroy tiles and it shows a nice effect when destroying too, but iv'e come across a problem.
If you aren't aware, Terraria destroys tiles, destroying tiles in Graal; while possible, it doesn't save immediately.
This is the serverside part.
PHP Code:
temp.x = params[1];
temp.y = params[2];
temp.old = tiles[x, y];
if(old == 511) return;
tiles[x, y] = 511;
temp.npc = putnpc2(x, y, null);
temp.npc.join("destroy");
updateboard2(x, y, 1, 1);
savelevel(player.level);
I don't think there's anything wrong with that, the tiles do show as the new ones immediately, similar to the online tile editor, but is there any way to get them to save to the file too?
Another issue is players on other levels, when they enter your level (on the gmap) they see the old tiles.
Would it be easier to just have hundreds of putnpc2's placed that act as the games tiles? or would this lag?