how do i lock items i add to the map

how do i lock items i add to the map

« posted: Oct 28, 2015, 10:37 AM »
hi

ive added a new tank farm on our stratis server problem is the items are movable is there anyway that i can have them locked on the map so players cant move them or lock them in possition after a restart i have sometimes got to remove the locked items as they overlap the original military base headquarters and when you go into them and open door you have to open 2 doors to open to get by them

im not sure if i can do something on the editor to stop them from beeing moved

any help greatly appreciated
  • Offline LouD
  • Silent but deadly ;)
  • Moderator
  • Veteran
  • ******
  • Posts: 1415

Re: how do i lock items i add to the map

« Reply #1 posted: Oct 28, 2015, 10:56 AM »
You can add this to the init line in the editor:

Code: [Select]
this setVariable [""R3F_LOG_disabled"", true];
It would look like this:
https://github.com/LouDnl/ArmA3_Wasteland.Altis/blob/LouD/mission.sqm#L2936

Re: how do i lock items i add to the map

« Reply #2 posted: Oct 28, 2015, 11:00 AM »
thanks loud i will give that a go

is it best to add in the editor or just edit the mission.sqm directly

Re: how do i lock items i add to the map

« Reply #3 posted: Oct 28, 2015, 11:02 AM »
Best way i think is to add this line to your editor placed objects in the mission.sqm file, utilizing what agent rev already made for the "dump" village etc. (keep in mind that i think this also sets the object straight etc (if you banked it))
https://github.com/A3Wasteland/ArmA3_Wasteland.Altis/blob/master/mission.sqm#L2155

essentially what you want is this variable set to the objects
https://github.com/A3Wasteland/ArmA3_Wasteland.Altis/blob/master/server/functions/setupMissionObject.sqf#L22
This is the file that the first example calls but if you add your objects another way disabling R3F is what you want.

Re: how do i lock items i add to the map

« Reply #4 posted: Oct 28, 2015, 11:03 AM »
ninjad   ;)

BTW, if you run in to things not working (at some time in the future) like placed fuelpumps not working or lights not working. See so something like this isn't set to the object "_object enableSimulation false;"

While i believe it saves the server(maybe its the client) processing some its not desired to have on evereything, like fuelpumps.

Then again, being wasteland maybe its possible/desirable to disable all fuel pumps on the map using this?? i think Rev made a function to find all watersources(objects) somewhere =)

Re: how do i lock items i add to the map

« Reply #5 posted: Oct 28, 2015, 11:37 AM »
i added this to the object in the editor

init="[this, true] call A3W_fnc_setupMissionObject";

but when i do it changes from military cargo tower to a large bunker for some reason and i dont get an option anywere to put it back to military cargo tower

its weird

also is there a code i can add so that i can make vehicles so they dont take damage i have 4 trucks i want to leave in our tank farm fuel ,repair ,ammo and medic

the idea is our tank farm has around 7 or 8 different tanks all ready to go apart from fuel you need to work towards getting fuel added at the minute they can tow the fuel ,repair ,ammo and medic vehicles but i want it so they stay and cant be towed to the tank possitions and also want them indestructable so they are there at all times
this will make it so they have to either get a fuel truck of there own or find a fuel can to get 1 of the tanks moving then they can fuel up at the trucks

thats the idea anyways

Re: how do i lock items i add to the map

« Reply #6 posted: Oct 28, 2015, 12:06 PM »
got it working guys had to add the init in the mission file itself

just need to get it so the vehicles dont die

Re: how do i lock items i add to the map

« Reply #7 posted: Oct 28, 2015, 08:07 PM »
Yeah, when i add shit in the editor i always screw up things =). Hence why i add shit this way instead (using GID, if you want to move your stuff from mission.sqm to separate files like this, you need to switch the tow last values for "_pos" as sqm use xzy and sqf xyz or something, you will see what im babbling about)
https://github.com/Cael817/ArmaA3_auxops_demo.Stratis/blob/master/addons/extraSites/stratis_airport_vehicles.sqf

If you added the vehicles in the editor, what loud linked should work on vehicles also
https://github.com/LouDnl/ArmA3_Wasteland.Altis/blob/LouD/mission.sqm#L2936
making them untowable and undamagable, if you want it so no one can move them i guess the simplest option is to lock them.

try (in mission.sqm  :) )
Code: [Select]
init="this setVariable [""R3F_LOG_disabled"", true]; this allowDamage false; this lock 2;";

Re: how do i lock items i add to the map

« Reply #9 posted: Oct 29, 2015, 08:56 PM »
Quote
If you have a break in script you can break in and steal those truck ;-)
You need to add a variable to it and then make sure the break in script skips those variables.

True, didn't think of that =), but couldn't you do a !isNil check on that ownerUID varible instead of adding an extra variable to it

Code: [Select]
!isNil {cursorTarget getVariable 'ownerUID'}
thus only allowing breaking into owned vehicles?

Then again, it might be useful to differentiate between all those types of vehicles, ie. owned, mission, static etc.

Re: how do i lock items i add to the map

« Reply #10 posted: Oct 29, 2015, 10:38 PM »
everything seems fine

i decided against not beeing able to destroy the vehicles i will keep this post though i will need it in the future

thanks again for all the help