Ko/Working ladders

From Valve Developer Community
Jump to navigation Jump to search

도입

모든 Source 게임들에선 (Team Fortress 2Portal 2 같이 사다리가 없는 게임을 제외하고) 플레이어가 사다리로 인식할만한 프롭이나 블럭들이 게임에 포함되어 있습니다, 그리고 보이지않는 엔티티/블럭이 실제로 오를수 있는 사다리를 구현하는 것입니다. 이것은 플레이어에게 어디만큼이 자신이 사다리를 타고 오를수 잇는 방향인지 조금의 오해를 줄수 있습니다.

사다리 모델/블럭

보이는 사다리를 만들기 위해, 당신은 prop_static 을 사다리 모델과 함께 사용해야 합니다 models/props_c17\metalladder001.mdl 나 블럭 기반의 사다리를 만들고 사다리의 텍스쳐 (metal/metalladder001a) 를 입힐수도 있습니다.

등반 시스템

Half-Life 2Half-Life 2: Deathmatch 에 있는 사다리들은 전작들의 비해서 조금은 향상된 사다리를 지원합니다, 플레이어들이 이용하기도 쉽고 개발자들도 디자인할때 쉬운 디자인을 가능케합니다, 반면에 Counter-Strike: SourceDay 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.

Fig. 1a - Ladder points (using two func_ladderendpoints)
Fig. 1b - Changing orientation
Fig. 1c - Slanted ladder points

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.)

하강장소

Fig. 2 - Dismounts

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.

Fig. 3a - In-game visualization (sv_showladders 1)
Fig. 3b - Endpoint stuck in floor

게임에서 사다리가 작동하는 원리

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' 텍스쳐를 발라주세요.

그림 5 - prop_static 사다리 모델 앞에 'tools/toolsinvisibleladder' 텍스쳐가 입혀진 블럭

당신이 블럭을 func_ladder절대 맞추지 않았는지 확인하세요, 그냥 블럭의 상태로 냅두셔야 오를수 있는 사다리가 됩니다.

Left 4 Dead & Left 4 Dead 2 를 위한 사다리

아래의 강의를 읽고, Left 4 Dead 의 Left 4 Dead 2 를 위한 사다리를 만들어보세요:

사다리 최적화

사다리 모델, 모든 prop_static 들은, 충돌 감지를 위해 기본적으로 VPhysics를 이용합니다, 이것은 조금더 자세한 물리적 충돌을 제공합니다, 하지만 몇몇 경우에는 이것은 좋지 못합니다. 멀티플레이 맵에서는 VPhysics를 이용한 모델이 요구하는 다양한 리소스로 인해 부담이 큽니다, 그럼 이제 당신은 엄청난 렉 대신 좋은 물리적 효과를 희생할것입니다. 여기 좋은 해결책이 마련됬습니다 여러분! :

  • 만약 당신의 사다리가 HL2 이나 HL2:DM 를 위한 것이라면, 그리고 사다리가 수직으로 놓였다면, 좋은 해결책은 아무나 사다리 너머로 총을 쏠수있게 만드세요. 만약 그렇지 않다면 (사다리가 벽에 기대고 있는 경우) 당신은 간단하게 Collisions 값에서 Use Bounding Box값을 체크해주세요. 만약 그렇다면 당신은 Not Solid 로 체크해주시고 그곳에 보이지 않는 블럭 (toolsclip) 을두어서 사다리 대신 충돌을 감지할 무언가를 만들어야합니다.
  • 만약 당신이 HL2 나 HL2:DM 에서 기울거진 사다리를 만들고 있다면, Hammer 에서의 프롭을 감싸는 사각형 칸은 프롭과 함께 돌지 않습니다, 이것은 등반 시스템을 가로막습니다, 이것을 만드는 더 좋은 방법은, Not Solid 항목을 체크하는 것입니다, 그리고 보이지 않는 블럭을 기울여서 사다리의 주변에 배치하세요.
  • 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

CS:S/DoD:S

다른 볼것