Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-17-2013, 01:19 PM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
Send a message via Skype™ to Gunderak
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.
Graal Script 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 03:38 AM..
Reply With Quote
  #2  
Old 04-17-2013, 11: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, 03:41 AM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
Send a message via Skype™ to Gunderak
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 07:54 PM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright (C) 1998-2008 Linux cyberjoueurs All Rights Reserved.