Arma 3
Make a Ladder Invisible, but Climable
I'm trying to make a mission during WW2 that starts with all of the players spawning on a large troop transport, where they can linger & chat & use the arsenal before the mission. Then they go to the side of the ship where LCIs have parked up and climb down a net to the smaller ship to be deployed.

Problem is, the net I'm using isn't a ladder (obviously) its the Camo Net (Road) or Land_WW2_Setka_Dor, so my plan is to have hidden ladders the players will actually climb down but it'll look like they're using the net. However, every time I hide the ladder I can't climb it, even if I enableSimulation in the init, which has made me think the Action key is based on collision. So far I've used the Pier Ladder (Land_PierLadder_F), Ladder (Land_ladderEP1), and Ladder (Short) (Land_ladder_half_EP1).

Any ideas? Maybe I could have it so the net has the Action key which place the player on a random or closest invisible ladder. But I don't know what kind of code that would require.
Originally posted by Lettuce (formerly G4rrus):
Here the code altered to your conditions and type of ladder
this addAction ["Climb Down",{player action ["LadderDown",nearestObject[player,"Land_ladder_half_EP1"],0,1]},[],2,true,true,"","(getPosATL player select 2) > 25",15,false]; this addAction ["Climb Up",{player action ["LadderUp",nearestObject[player,"Land_ladder_half_EP1"],0,0]},[],2,true,true,"","(getPosATL player select 2) < 25",15,false];

result: https://gfycat.com/BlueValuableDassierat

____________________________________________________________

and here in case you prefer it, some ace self interactions for it (for initPlayerLocal.sqf) (requires the ladder to be called ladder_1)

private _actionLadderDown = [ "ladderDown", "Climb Down", "\A3\ui_f\data\IGUI\Cfg\Actions\Obsolete\ui_action_ladderondown_ca.paa", { player action ["LadderDown",nearestObject[player,"Land_PierLadder_F"],0,1] }, { ladder_1 distance2D player < 15 && {(getPosATL player)#2 > 25} } ] call ace_interact_menu_fnc_createAction; [player,1,["ACE_SelfActions"],_actionLadderDown] call ace_interact_menu_fnc_addActionToObject; private _actionLadderUp = [ "ladderUp", "Climb Up", "\A3\ui_f\data\IGUI\Cfg\Actions\Obsolete\ui_action_ladderonup_ca.paa", { player action ["LadderUp",nearestObject[player,"Land_PierLadder_F"],0,0] }, { ladder_1 distance2D player < 15 && {(getPosATL player)#2 < 25} }] call ace_interact_menu_fnc_createAction; [player,1,["ACE_SelfActions"],_actionLadderUp] call ace_interact_menu_fnc_addActionToObject;

result: https://gfycat.com/LightKlutzyAtlanticridleyturtle
< >
Showing 1-13 of 13 comments
U could try setting serObjectTexture with an empty string. Works on some models.
ChrisWithAKube Apr 7, 2019 @ 3:47pm 
didn't work with the ladders, they're still visible sadly
Tajin Apr 8, 2019 @ 2:34am 
If you hide the ladders in any way, their action will not work anymore.

Your second idea could actually work.

I would put 2 actions on the camonet, with a condition that checks the Z position of the player to determine if hes at the top or the bottom and then use the following to make him mount the invisible ladder:

https://community.bistudio.com/wiki/action/Arma_3_Actions_List#LadderUp
https://community.bistudio.com/wiki/action/Arma_3_Actions_List#LadderDown
ChrisWithAKube Apr 8, 2019 @ 1:04pm 
I'm trying that out right now, this is the code I've drummed up so far, if anyone who actually knows what they're doing wants to check it whilst I do the same. The large ship deck height is close to 26.2 units above the sea floor and the exit of the ladder is roughly around 23 units. This code is in the net's (net_1) init code.
Note: I've assigned 5 ladders the variable name "ladder_#" to add variety to where the player gets on the net, that's why there is "ladder" instead of a number. (I can remove it if its a problem)

this addAction ["Climb", if (getPosATL player > 25) then {player action ["ladderDown", (position player nearestObject "ladder"), 0, 1]} else {player action ["ladderUp", (position player nearestObject "ladder"), 0, 0]}];

current problem is the action isnt showing up
Last edited by ChrisWithAKube; Apr 8, 2019 @ 1:16pm
Getposatl returns an array. U gotta select the height value (select 2) and also if I recall addaction right u gotta put ur entire if statement into brackets {if ...}
Tajin Apr 8, 2019 @ 2:00pm 
Because your syntax is very wonky.

this addAction ["Climb down",{player action ["ladderUp", nearestObject[player,"classnameofyourladder"] ]},[],2,true,true,"","(getPosATL player select 2) > 25",15,false]; this addAction ["Climb up",{player action ["ladderDown", nearestObject[player,"classnameofyourladder"] ]},[],2,true,true,"","(getPosATL player select 2) < 25",15,false];

this might work... you'll just have to fill in the correct classname for the ladders.
Also u might not wanna use ATL if u do this on a boat
Tajin Apr 8, 2019 @ 2:02pm 
that is most likely a static boat he's talking about
Yeah but depending on the depth of water one of the actions might never appear since ATL will return bottom of ocean https://community.bistudio.com/wiki/Position#PositionAGLS
ChrisWithAKube Apr 8, 2019 @ 4:24pm 
The boat's static and the ocean floor's flat across the map, but I thought ATL only returned one variable. Also i only worked in c++ for two weeks so all I know is if statements

Tried the code you gave me, it gets me to do the animation but then, with the ladder's classname I just stay put, I can't move or look around and I stay where I selected the action; with the wrong classname I can slide around in the ladder state but its no better.

this addAction ["Climb down",{player action ["ladderUp", nearestObject[player,"Land_ladder_half_EP1"] ]},[],2,true,true,"","(getPosATL player select 2) > 25",15,false]; this addAction ["Climb up",{player action ["ladderDown", nearestObject[player,"Land_ladder_half_EP1"] ]},[],2,true,true,"","(getPosATL player select 2) < 25",15,false];
The author of this thread has indicated that this post answers the original topic.
Here the code altered to your conditions and type of ladder
this addAction ["Climb Down",{player action ["LadderDown",nearestObject[player,"Land_ladder_half_EP1"],0,1]},[],2,true,true,"","(getPosATL player select 2) > 25",15,false]; this addAction ["Climb Up",{player action ["LadderUp",nearestObject[player,"Land_ladder_half_EP1"],0,0]},[],2,true,true,"","(getPosATL player select 2) < 25",15,false];

result: https://gfycat.com/BlueValuableDassierat

____________________________________________________________

and here in case you prefer it, some ace self interactions for it (for initPlayerLocal.sqf) (requires the ladder to be called ladder_1)

private _actionLadderDown = [ "ladderDown", "Climb Down", "\A3\ui_f\data\IGUI\Cfg\Actions\Obsolete\ui_action_ladderondown_ca.paa", { player action ["LadderDown",nearestObject[player,"Land_PierLadder_F"],0,1] }, { ladder_1 distance2D player < 15 && {(getPosATL player)#2 > 25} } ] call ace_interact_menu_fnc_createAction; [player,1,["ACE_SelfActions"],_actionLadderDown] call ace_interact_menu_fnc_addActionToObject; private _actionLadderUp = [ "ladderUp", "Climb Up", "\A3\ui_f\data\IGUI\Cfg\Actions\Obsolete\ui_action_ladderonup_ca.paa", { player action ["LadderUp",nearestObject[player,"Land_PierLadder_F"],0,0] }, { ladder_1 distance2D player < 15 && {(getPosATL player)#2 < 25} }] call ace_interact_menu_fnc_createAction; [player,1,["ACE_SelfActions"],_actionLadderUp] call ace_interact_menu_fnc_addActionToObject;

result: https://gfycat.com/LightKlutzyAtlanticridleyturtle
Last edited by Lettuce (formerly G4rrus); Apr 9, 2019 @ 2:54am
ChrisWithAKube Apr 9, 2019 @ 5:58pm 
First code works like a charm, thanks man. Im not gonna go and try the ace one since the player wouldn't be able to see it due to the ship's railing
Boz Aug 29, 2024 @ 12:04pm 
Sorry for necro but can anyone please tell me how this works? I remember a few years ago I was able to very simply make a ladder invisible, without scripting, and still retain its functionality. I don't remember what I did to make it work, but I was very inexperienced at the time so it couldn't have been anything fancy. If anyone can explain to me how this code works, that would be much appreciated.
< >
Showing 1-13 of 13 comments
Per page: 1530 50