Jump to content
Sign in to follow this  
Octanen

R3F Restricting Logistics to marker area

Recommended Posts

So here i am customizing and editing a wasteland map. (A3Wasteland)

It all works just fine except one thing i simply cannot get to work.

I have created a safe heaven for the players that requested this function so they could RP / Trade and such as they please.

I got the safe heaven working so no "damage" can be done within the zone, but now the issue is that all objects created within the given area are movable due to R3F logistics.

I have been reading various places, armaholic, here on the forums and simply googling my butt off, and here is what i have so far, but im running into some serious issues, the map refuses to load after i added this to the \server\init.sqf before it loads the entire map :)

// Trading Outpost Building Protection

_x setVariable ["R3F_LOG_disabled", true, true];
} forEach ((getMarkerPos "pzone1") nearestObjects ["Land_HBarrier_3_F","Land_BarGate_F","Land_Cargo40_military_green_F,"Land_TentDome_F",", 200]);

This is added before the world\init.sqf so the objects will be "immovable" before anything else spawns in, as a protection so if something is placed after server start, it can be moved, but if its something I put into the world through the editor, its immovable at that location.

The area is 300x300 and marker name is "pzone1" as you can see.

Now my question is why is this not working as intended, what have i missed in my halfsleep here.

I am still rather new to scripting and editing scripts, but if i get pointed in the right direction im not completely useless ;)

Edited by Octanen

Share this post


Link to post
Share on other sites

I can't say this will fix it but there should be a { before _x setVariable ["R3F_LOG_disabled", true, true];

Share this post


Link to post
Share on other sites

Yeah i might have found a solution for it, i found out it has to be added at the end of the R3F init, but the thing is that well... it still wont work, the objects are still "moveable" and people can lock them down.

// Trading Outpost Building Protection

if (isServer) then
{
   [] spawn
   {
       // Wait a bit to be sure that the Domi has finished to do its stuff
       sleep 5;

       {
           _x setVariable ["R3F_LOG_disabled", true, true];
       } forEach ((getMarkerPos "pzone1") nearestObjects ["Land_HBarrier_3_F","Land_BarGate_F","Land_Cargo40_military_green_F,"Land_TentDome_F", 200]);
   };
};

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×