Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #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
  #2  
Old 04-17-2013, 10:13 PM
DrakilorP2P DrakilorP2P is offline
Registered User
DrakilorP2P's Avatar
Join Date: Apr 2006
Posts: 755
DrakilorP2P is just really niceDrakilorP2P is just really nice
I think if you add savelevels=true in serveroptions it'll save to the file.

Having an NPC for each tile would probably lag, though I haven't tried it. I'm not sure if you can do Terraria in Graal without lag but you can try I guess.
__________________
Testbed user: I figured since I can never find any scripters it was time to take desperate measures...and...TEACH MYSELF 0.0
Reply With Quote
  #3  
Old 04-18-2013, 02:41 AM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
All that is set, and it does save after about 5 minutes, but then the tiles don't show to other players until I write "update level".
__________________

Gund for president.

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


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:09 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.