Joshi120

Tree Respawn in territory

4 posts in this topic

Hey there :3

After playing a while on Tanoa i realized it is a damn pain to find a good "open" place to build now to the question itself.

i know you can remove map objects in the editor but how about attaching a script to a buildable object on the server would that be possible ?

Share this post


Link to post
Share on other sites

Posted (edited)

If you want to remove a tree or a bush on your server, in the mission file in initPlayerLocal
Coordinates would be where the tree you want to remove is, I put 20m as the radius to make sure it was nerfed

You could clear a whole area by setting the coordinates and the range to much bigger
 

_objs = nearestTerrainObjects [[11834,11886.1,0.00135803], ["Tree","Bush"], 20];  
{ _x hideObject true; } forEach _objs;

As for your initial question, I would advise against running anything that clears trees when placing a building object, as you can only execute that on the client locally. If it's in the mission file as set coordinates, every player has them removed, if you attach it to building, only the player building has them removed unless you push it live to all players - bad for performance

Edited by MGTDB
2 people like this

Share this post


Link to post
Share on other sites
Advertisement

ah alright Yea i knew about the remove part to make it via cords just hoped it may be possible to attach it to something without Perf. loss and ofc for everyone to see anyway thanks for clearing that up :3

Share this post


Link to post
Share on other sites

What about saving what trees have been removed before server restart and have them stay removed when the server is done restarting? On jungle maps, when you clearcut and area for your base, you dont want to come back in to find a forest in your living room.  Would it be possible to save the objects to the database and during server boot to push the updated information? That way, you get the best of both worlds. You get the trees removed that you removed with your axe and you dont lose server perf. 

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.