Locking objects in arma 3 editor?

Locking objects in arma 3 editor?

« posted: May 23, 2015, 02:08 AM »
I am building team bases in the editor, and other players are able to move these objects, i was wondering if there was a way to lock these objects as code in the arma 3 editor?

Re: Locking objects in arma 3 editor?

« Reply #1 posted: May 23, 2015, 02:30 AM »
in the object init add.
Code: [Select]
this setVariable [""R3F_LOG_disabled"", true];
so when you look in the mission.sqm the init line is
Code: [Select]
init="this setVariable [""R3F_LOG_disabled"", true];";
or you can piggyback on agent revs function
Code: [Select]
init="[this, true] call A3W_fnc_setupMissionObject";but that also does some other things you need to check in setupMissionObject.sqf

But the most important thing is to somehow set "R3F_LOG_disabled" to true.

Re: Locking objects in arma 3 editor?

« Reply #2 posted: May 23, 2015, 12:44 PM »
in the object init add.
Code: [Select]
this setVariable [""R3F_LOG_disabled"", true];
so when you look in the mission.sqm the init line is
Code: [Select]
init="this setVariable [""R3F_LOG_disabled"", true];";
or you can piggyback on agent revs function
Code: [Select]
init="[this, true] call A3W_fnc_setupMissionObject";but that also does some other things you need to check in setupMissionObject.sqf

But the most important thing is to somehow set "R3F_LOG_disabled" to true.

It comes up with the error "Missing ]" 

I've posted an attachment of what i have done

Re: Locking objects in arma 3 editor?

« Reply #3 posted: May 23, 2015, 02:54 PM »
I seldom use the editor but try changing the double quotations to single
I copy pasted what I wrote without checking (directly from the mission.sqm)

Re: Locking objects in arma 3 editor?

« Reply #4 posted: May 24, 2015, 01:52 AM »
Did it! Thanks.

Re: Locking objects in arma 3 editor?

« Reply #5 posted: May 26, 2015, 03:43 AM »
strange thing I found using 2d editor, apparently the server spawns thes objects each time the map restarts, so if someone happens to lock one down, persistence will cause the original to reload and then the server will spawn a new one inside of it. so, for example if you have a cargo house and someone locked it down,  after two or 3 restarts, you will have 3 houses inside one another. It is not noticeable until you have to open 3 doors to get inside of it.

I am 99% certain that this is something I have (or have not) done. I guess disabling R3F will prevent anyone from locking the object down, but do I need to add that line to the init of each and every item?

I have moved on to GID now and all objects are in one script file, so is there a line I can add to the script file to disable R3F that will apply to the base script as a whole? Also, disabling it in this script only affect the specific items within and not all similar items on the map, correct?

Re: Locking objects in arma 3 editor?

« Reply #6 posted: May 26, 2015, 09:39 AM »
You would have to write it to every object i believe, you could also use Revs function setupMissionObject.sqf(i think its called). look how its done in mission.sqm (at least in the altis map).

For GID i think i described it pretty well here
http://forums.a3wasteland.com/index.php?topic=1426.0
But even there you might have to do it for each object.
maybe you can try something nifty like in the end of each "GID script" do
Code: [Select]
{
_x setVariable ["R3F_LOG_disabled", true];
}forEach _object;
but i have tried it

Please tell if something like that works and ill add it to my GID post.