View Single Post
  #1  
Old 04-17-2013, 12:19 PM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
Need some advice

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.params[1];
    
temp.params[2];
    
temp.old tiles[xy];
    if(
old == 511) return;
    
tiles[xy] = 511;
    
temp.npc putnpc2(xynull);
    
temp.npc.join("destroy");
    
updateboard2(xy11);
    
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?
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion

Last edited by Gunderak; 04-18-2013 at 02:38 AM..
Reply With Quote