Purzel 35 Posted October 16, 2018 Hi there, I´ve a question about building-doors... I set up a house (Land_House_Big_02_F (bungalow)), which has 5 doors named bungalow. That building has a room which has two entries into one room. In that room, theres a terminal the players must hack, to gather informations... For security this room is locked (door-States of door 3 & door 5 are set to locked) with the Eden-Editor as shown for example in this picture. How can I put the BIS_fnc_holdActionAdd only on this two doors? e.g.: [door5, "Lockpick door", "pictures\holdaction_key.paa", "pictures\holdaction_key.paa", "_this distance _target < 3", "true", {}, {}, { bungalow setVariable["bis_disabled_Door_5",0,true]; }, {}, [], 5, nil, true, false] call BIS_fnc_holdActionAdd; would be the code if the door would be a single object, but it´s a "child" of the "parent" Land_House_Big_02_F (bungalow)... So how can I adress door5 itself to show the Lockpick-HoldAction only at door5 ? (and of course door3 itself) Thanks for your help! Purzel ___________________________________________________________________________ In case anyone needs some custom HoldAction-Icons, feel free to use them: (format: .png, 64 x64 px, just import them to TexView and save as .paa)) and an empty one for your own creations: Please do NOT quote the icons for traffic reasons in your posts - thanks! If anyone needs some special HoldAction-icons, just send me a message and I will try to create it for you. 2 3 Share this post Link to post Share on other sites
zagor64bz 1225 Posted October 16, 2018 13 hours ago, Purzel said: In case anyone needs some custom HoldAction-Icons, feel free to use them: I cannot answer your main quest man, but certainly I thank you for those icons! Share this post Link to post Share on other sites
pierremgi 4905 Posted October 17, 2018 You can try this code in init field of bungalow: [ this, "Lockpick door", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", " call { private ['_intersects','_select_door']; _intersects = ([cursorObject, 'VIEW'] intersect [ASLToATL eyepos player, (screentoworld [0.5,0.5])]); _select_door = if (count _intersects > 0 && {(_intersects select 0) select 0 in ['door_3','door_5']}) then [{format ['bis_disabled_%1', (_intersects select 0 select 0)]},{''}]; if (_this distance _target < 15 && _select_door in ['bis_disabled_door_3','bis_disabled_door_5']) then { MGI_select_door = _select_door; true } else {false}; }; true", "true", {}, {}, { if (_target getVariable [MGI_select_door,1] !=0) then { _target setVariable[MGI_select_door,0,true] } else { _target setVariable[MGI_select_door,1,true] } }, {}, [], 5, nil, false, false ] call BIS_fnc_holdActionAdd; 3 1 Share this post Link to post Share on other sites
Purzel 35 Posted October 17, 2018 Great! You´re code is working perfectly!!! A big Thanks!I understand what you´re doing there, but I wouldn´t know by myself, how to to find the solution. Share this post Link to post Share on other sites
major-stiffy 280 Posted October 17, 2018 11 hours ago, pierremgi said: You can try this code in init field of bungalow: Awesome info. I tried this in the init of the same house referenced above. I get the prompt to "Lockpick door but it doesn't actually unlock. As soon as it reaches the end of the holdaction the same holdaction appears again, I've tried it with the door unlocked and locked in the editor. I was using door 5. I'm assuming only your code in the houses init is all that's required or am I missing something? Appreciate any help and sorry to high jack the thread. Share this post Link to post Share on other sites
pierremgi 4905 Posted October 17, 2018 1 hour ago, major-stiffy said: Awesome info. I tried this in the init of the same house referenced above. I get the prompt to "Lockpick door but it doesn't actually unlock. Did you lock it by editor? You can always try this other code: [this, "Lockpick door", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", " call { private ['_intersects','_select_door']; _intersects = ([cursorObject, 'VIEW'] intersect [ASLToATL eyepos player, (screentoworld [0.5,0.5])]); _select_door = if (count _intersects > 0 && {(_intersects select 0) select 0 in ['door_3','door_5']}) then [{format ['%1_sound_source', (_intersects select 0 select 0)]},{''}]; if (_this distance _target < 15 && _select_door in ['door_3_sound_source','door_5_sound_source']) then { MGI_select_door = _select_door; true } else {false}; }; true ", "true", {}, {}, {if (_target animationSourcePhase MGI_select_door == 0) then {_target animateSource [MGI_select_door,1]} else {_target animateSource [MGI_select_door, 0] }}, {}, [], 5, nil, false, false] call BIS_fnc_holdActionAdd; 1 Share this post Link to post Share on other sites
major-stiffy 280 Posted October 17, 2018 (edited) 4 hours ago, major-stiffy said: I've tried it with the door unlocked and locked in the editor. 2 hours ago, pierremgi said: You can always try this other code: OK, tried your new code above and it worked. Prerequisite requires the door to be locked in the editor. TBH, I used the code above in a script changing this to bungalow (variable name). Works. Next question to just tidy it up is that the action remains on the door even after it's open. Just thought I'd point that out. Thanks soooo much for taking the time to respond. I've always wanted to know how this worked. Also appears these actions work too but have not tried them yet. "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa" "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_forceRespawn_ca.paa" "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_hack_ca.paa" "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_revive_ca.paa" "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_reviveMedic_ca.paa" "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_search_ca.paa" "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_takeOff1_ca.paa" "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_takeOff2_ca.paa" "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_unbind_ca.paa" EDIT: Also the door cannot be closed once open. Edited October 17, 2018 by major-stiffy Added edit 1 Share this post Link to post Share on other sites
black_hawk_mw2_87 74 Posted February 6, 2019 All this information is great and the very last code worked for me perfectly. The previous one was not a success. I had to start all over again when the action was done. How can I add sfx sound to the action itself? 🙂 Share this post Link to post Share on other sites