Closed Cael817 closed 9 years ago
Documentation for the lock command: https://community.bistudio.com/wiki/lock says:
0 - Unlocked
1 - Default
Which I assume means ... that 1
could be either locked
, or unlocked
, depending on the default value form the vehicle's config. So when using 1
there is no guarantee that the vehicle will be unlocked
.
I believe 1 is unlocked, and i agree 0 should work fine, just remembered i had to change it, i think i got some unexpected behaviors with 0. I haven't run into anything yet so maybe we should close this and just keep it in mind?
The only problem that I could see happening is when using the locked
command to determine if a vehicle is locked or not.
You have to do something like this
private["_unlocked"];
_unlocked = ((locked _vehicle) < 2);
Maybe' that's the issue you had ...
Might be, was a long time ago, but i think if you check for the "locked" variable on a vehicle where you never altered the lock state, it think it returns 1. Anyway, ill close it for now =).
Not entirely sure but i think it might be better using 1 instead of 0, think i had problems before using 0. I don remember what the symptoms where however.
va_functions.sqf line 268 or so va_unlock = { _this pushBack 0; _this call va_remote_lock; };