Well Andrew_S90 and I have been working on the base buildings to be brought into origins and we're about 85% done. We are hitting a snag with strongholds. As of right now, if you place a stronghold, it will supply a randomly generated code for an unlock. The person who built the structure can open and close it freely, however, a person when they place in the randomly generated code, will not unlock the structure. So we're at a bit if a snag. What are we missing here? This is the code we are using thus far (Andrew_S90 edited the safe unlock script from epoch):
if((typeOf cursorTarget == "krepost") && (player distance cursorTarget < 23)) then {
if (s_player_unlockstronghold < 0) then {
if((typeOf cursorTarget == "krepost") then {
if ((cursorTarget getVariable ["CharacterID","0"] == dayz_combination) or (cursorTarget getVariable ["CharacterID","0"] == dayz_playerUID)) then {
_sCombo = player addAction [format[ "Open %1",getText (configFile >> "CfgVehicles" >> typeOf cursorTarget >> "displayName")], "custom\build\stronghold\s_open.sqf",cursorTarget, 0, false, true];
s_player_str set [count s_player_str,_sCombo];
} else {
_sCombo = player addAction [format[localize "STR_EPOCH_ACTIONS_UNLOCK",_text], "custom\build\stronghold\s_unlock.sqf",_cursorTarget, 0, false, true, "",""];
s_player_str set [count s_player_str,_sCombo];
};
s_player_unlockstronghold = 1;
} else {
if((cursorTarget getVariable ["CharacterID","0"] != dayz_combination) or (cursorTarget getVariable ["CharacterID","0"] != dayz_playerUID)) then {
_sCombo = player addAction [localize "STR_EPOCH_ACTIONS_RECOMBO", "custom\build\stronghold\s_unlock.sqf",_cursorTarget, 0, false, true, "",""];
s_player_str set [count s_player_str,_sCombo];
s_player_unlockstronghold = 1;
};
};
};
} else {
{player removeAction _x} count s_player_str;s_player_str = [];
player removeAction s_player_unlockstronghold;
s_player_unlockstronghold = -1;
player removeAction _sCombo;
_sCombo -1;
};
Question
LunchboxCharlie
s_unlock.sqf
s_open.sqf
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now