6 posts in this topic

Hi Folks,

 

Im looking for some advice here, not so much a complete script, just a little direction.

Im looking into some options on a test server for base security and one of those is locking all doors in the base radius (or unlocking). I have seen this done with certain vehicles and wondered how it would work on a base.

I thought it would be simple enough but i am either blind or not working it out. So far all I have been able to do is "Bodge Lock" the doors by setting the variable "ExileIsLocked" but it doesnt hold after restart (Assume because its the physical lock not the full lock and remember)

CursorTarget setVariable ["ExileIsLocked",1,true];

I am looking for more of a  "Rotate Shut and Lock" / "Rotate Open and Lock" like the above mentioned vehicle script.

If anyone could kindly point me in the right direction I would be grateful

Regards

LordRampantHump

 

Share this post


Link to post
Share on other sites

I would do this in the database with a sql job/event scheduled to run 1 min before restarts?

Sorry am on phone so, can't give you examples but, from memory, you're looking to update a column called 'is_locked' in the construction and container tables to -1. 

If you're not au fe with sql, you should be able to get an example from Google pretty easily. 

Maybe 

Update `container` set `is_locked` to -1

But don't quote me.... 

Good luck 

1 person likes this

Share this post


Link to post
Share on other sites
Advertisement

Posted (edited)

Thanks for the reply @BaroN however I am looking more for something triggerable by the player in game such as an add action on the base laptop "Lockdown Base"

Heres what I have so far:

 _LockableDoors = nearestObjects [player, ["Exile_Construction_ConcreteGate_Static"], 50];  
 
{  
    _position = getPos _x;  
    _positionx = _position select 0;  
    _positiony = _position select 1;  
 
 
    _placesmarkername = format ["door%1", _forEachIndex];  
    _placesmarker = createMarker [_placesmarkername, [_positionx, _positiony] ];  
    _placesmarkername setMarkerColor "ColorRed";  
    _placesmarkername setMarkerType "hd_objective"; 
 
 
["SuccessTitleAndText", ["Debug Note", format ["%1", _x]]] call ExileClient_gui_toaster_addTemplateToast;
_x spawn ExileClient_object_construction_deconstruct;
} foreach _LockableDoors; 

I get the doors ok and my test markers are fine but i have no ability to lock or unlock the doors.

The reason why i am trying "ExileClient_object_construction_deconstruct" in this example  is im trying to see it i can do ANYTHING to the object but i cant.

Ive tried:

 _x getVariable ["ExileAllreadyKnownCode",""];

to see if i can grab the code from the memory or the 0 or 1 or whatever but i get nothing.

 

 

Edited by LordRampantHump
Further Info Added

Share this post


Link to post
Share on other sites

Ok im nearly there, I just need a way to validate the player, I was thinking about using the remembered code but that doesnt seem to wotk getVariable ["ExileAllreadyKnownCode",""];

Owner is working but that doesnt help

getVariable ["ExileOwnerUID",""];

 

Any ideas?

1 person likes this

Share this post


Link to post
Share on other sites
39 minutes ago, Eldari said:

PM'd

 

Why? 

1 person likes this

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.