Ko/Working ladders
도입
모든 Source 게임들에선 (Team Fortress 2 와 Portal 2 같이 사다리가 없는 게임을 제외하고) 플레이어가 사다리로 인식할만한 프롭이나 블럭들이 게임에 포함되어 있습니다, 그리고 보이지않는 엔티티/블럭이 실제로 오를수 있는 사다리를 구현하는 것입니다. 이것은 플레이어에게 어디만큼이 자신이 사다리를 타고 오를수 잇는 방향인지 조금의 오해를 줄수 있습니다.
사다리 모델/블럭
보이는 사다리를 만들기 위해, 당신은 prop_static 을 사다리 모델과 함께 사용해야 합니다 models/props_c17\metalladder001.mdl 나 블럭 기반의 사다리를 만들고 사다리의 텍스쳐 (metal/metalladder001a) 를 입힐수도 있습니다.
등반 시스템
Half-Life 2 나 Half-Life 2: Deathmatch 에 있는 사다리들은 전작들의 비해서 조금은 향상된 사다리를 지원합니다, 플레이어들이 이용하기도 쉽고 개발자들도 디자인할때 쉬운 디자인을 가능케합니다, 반면에 Counter-Strike: Source 와 Day of Defeat: Source 사다리들은 전작의 게임들과 유사한점이 꽤나 많습니다. Counter-Strike: Source 와 Day of Defeat: Source 사다리를 만들고 싶다면, 아래를 봐주세요.
Ladder entities for Half-Life 2 series / Half-Life 2 Deathmatch
To create a ladder you must define the volume in which the player will move through space while on the ladder. This volume can be defined in two ways: Using the func_useableladder entity, or using the deprecated func_ladderendpoint entity (which is only briefly described below to provide understanding of the workings of older maps).
The func_useableladder entity can be divided into two sub entities: a starting point and an ending point (See Fig. 1a). Their positions can be typed into the keyvalue fields, or more typically the ladder volume can be defined using the visual ladder tool, by dragging its center circle that is visible when the entity is selected (See Fig. 1b). Using this tool you can drag the start and end point of the ladder into appropriate positions in the 2D view. The ladder's start and ending point may be of arbitrary orientation and length (See Fig. 1c). Simply pull the endpoints where you want them and the player will move between these points while on the ladder.
As you place the endpoints, make sure that you place them a couple of units away from the visible ladder brush (or any other brush or model) because if any four sides of the ladder volume is even touching against a surface of a brush or a model, this will make that part of the ladder volume unclimbable.
The now obsolete func_ladderendpoint entity just consists of a single endpoint. A ladder volume is created by linking two func_ladderendpoints together using their properties. A ladder volume is created between two func_ladderendpoints by naming one of the endpoints and having the other endpoint point to its name in its Other value. (It is not necessary for the second endpoint to point back at the first as stated in properties.)
하강장소
Along with the volume of movement, you can also provide dismount points for the ladder (See Fig. 2) to allow easier and more controlled dismounts. These points are marked using the info_ladder_dismount entity. While next to and facing one of these markers, the player can press his use key to dismount to the position of the marker (typically when ladders run between more than two floors). If he has reached one of the ends of the ladder, he can also simply walk off the ladder by facing one of the markers nearby and walking forward. You can use multiple info_ladder_dismount markers for each dismount place to provide more directions to exit the ladder in.
To avoid possible confusion between nearby ladders using different dismount markers, each info_ladder_dismount entity has a property value called LadderName which can be used to contain the name of the ladder it belongs to.
Like the ladder volume, the dismount points must be free of obstruction and allow the player to stand at their position without intersecting solid world geometry.
인-게임 테스트
Once you have created your ladders, you can compile your map and test them. If you wish, you can also display the ladder entities in-game along with some debug information by opening the console and typing sv_showladders 1
to enable this, and then load or reload (by typing restart
) the map you wish to view.
This will show you all the start and end points of the ladders (func_useableladder and func_ladderendpoint entities), as well as the dismount points (info_ladder_dismount entities) (See Fig. 3a), and can help you determine if these entities are set up properly, if ladder entities are colliding with solid world geometry or the prop model of the ladder itself (See Fig. 3b), and which func_ladderendpoint entities connect to each other.
게임에서 사다리가 작동하는 원리
The safest way to mount a ladder in Half-life 2 is to approach its invisible ladder volume and within reaching distance press the use key. This will automatically position you on the ladder. (You can also walk into the ladder volume, with greater risk of missing it and falling down any hole.)
To dismount a ladder you can always either jump off, or press your use key. If the ladder has info_ladder_dismounts, you can also simply walk off from its endpoints, and pressing your use key while next to and facing an info_ladder_dismount will also allow more controlled dismounts anywhere on the ladder.
Counter Strike: Source, Day of Defeat: Source 와 Garry's Mod 사다리
Create another brush in front of the object/brush you want to be climbable, as close as you can to it, but without touching it. Make sure that the face is the same width/height as the climbable object. Assign the material tools/toolsinvisibleladder to this brush and then tie it to an entity (CTRL+T). Select func_ladder from the Object Properties dialog. You now have a climbable face which is in front of the object/brush.
![]() Fig. 4 - func_ladder textured with tools/toolsinvisibleladder in front of a prop_static ladder. |
While on a ladder in CS:S your shooting accuracy will be significantly reduced.
The similar ladders using in Half-Life 1, but there is AAATRIGGER texture used instead of tools/toolsinvisibleladder.
Counter Strike: Global Offensive 를 위한 사다리
물체나 블럭앞에 오를수 있게 하고자 하는 곳에 블럭을 만들어주세요, 최대한 사다리에 가깝게, 하지만 닿을수는 없게 해주세요. 당신이 높이와 넓이를 오를수 있는 물체에 맞추었다면, 'tools/toolsinvisibleladder' 텍스쳐를 발라주세요.
[[Image:CSGO_Ladder.PNG|thumb|600px|left|그림 5 - prop_static 사다리 모델 앞에 'tools/toolsinvisibleladder' 텍스쳐가 입혀진 블럭 |
당신이 블럭을 func_ladder 로 절대 맞추지 않았는지 확인하세요, 그냥 블럭의 상태로 냅두셔야 오를수 있는 사다리가 됩니다.
Left 4 Dead & Left 4 Dead 2 를 위한 사다리
아래의 강의를 읽고, Left 4 Dead 의 Left 4 Dead 2 를 위한 사다리를 만들어보세요:
사다리 최적화
The ladder props, like every prop_static, default to using VPhysics for collision detection, which will provide more detailed physics collisions, but in some cases this might not be preferable. In multiplayer maps and very resource demanding maps using VPhysics props costs precious resources, and you might want to sacrifice good physics to avoid potential lag. Here are some good methods to minimize resource cost:
- If the ladder is for HL2 or HL2:DM, and the ladder is straight, the best method depends on whether somebody is going to be able to shoot through the ladder. If they are not (like if the ladder is against a wall) you could simply change the Collisions keyvalue to Use Bounding Box. If they are, you could change the keyvalue to Not Solid and place an invisible Clip (toolsclip) to detect collision with it instead.
- If you are creating a slanting ladder for HL2 or HL2:DM, a bounding box will not rotate with the prop, and will obstruct the climbing system, in which case you are better off making the ladder prop Not Solid and place an invisible, rotated Clip (toolsclip) or Player Clip (toolsplayerclip) textured brush alongside the ladder (depending on whether or not somebody is going to be able to shoot through it).
- If the ladder is for a CS:S or DoD:S map, you could change the Collisions keyvalue to Not Solid and make the func_ladder brush cover the ladder prop, rotating it if necessary.
In multiplayer maps it's also an understood expectation to be able to move freely parallel to the surface that a ladder covers. When it comes to brush based ladders, you can get away with turning the ladder brush into a non-solid func_brush to avoid players getting temporarily "stuck" against the side of the ladder, but when it comes to prop ladders, they are often too protruding from the wall to make a player standing inside a ladder believable. In that case you are probably better off using two Player Clip textured wedges at the sides of the prop, guiding the player to the front of the prop.
If nothing else, you could turn a brush ladder into a func_detail to avoid unnecessary brush leafs.
예제
HL2/HL2:DM
- LaddersHL2.zip (6k)
- ladder_simple - 완전한 사다리가 만들어져 있습니다.
CS:S/DoD:S
- LaddersCSS.zip (7k)