|
Back to Tutorials Page
Ladders in Counter-Strike: Source
By Unarmed Last changed Sep
29, 2006
This tutorial will guide you through the process of
creating ladder in a Counter-Strike: Source map.
Ladders in CSS are a much simpler version of the HL2 ladder.
CSS ladders should NOT be used in HL2 and vice versa.
Please note that this tutorial requires that you have some
basic knowledge of Hammer.
You can download the completed VMF
here
Getting Started.
Start "Hammer"
from your SDK and if you have a map you wish to add ladders to then load that. Otherwise make a simple
map with a wall that you wish to add a ladder to. You should have
something like
this.
The Visual
Ladders in Counter-Strike: Source are real
simple and just like in Half-Life2
made up of two things. One is the visual part and one is the part that you actually climb. These two can
be implemented in different ways and one does not require the other. This means that while you usually have
your players climb actual ladders you might as well have them climbing drainpipes or even thin air, although
climbing air is not recommended. Be imaginative and play around.
Firstly we do the visual part, the actual ladder as seen by the player. I will here use a prop_static with
it's world model set to "models/props_c17/metalladder001.mdl". Its a nice sturdy ladder and is also the same height
as the wall I want to be climbing. You may use anything you wish. Align the ladder to whatever it is that you wish to
climb and you should have something like this:
Believe it or not, but
that's all for the visual part.
The Ladder
Having done the visual bit we now make the ladder and that is also ever so simple. In your texture browser
find and select the "toolsinvisibleladder" texture. It should be red and non-transparent. Now make a brush
covered in this texture that covers the item that you want to climb. Make your brush a little bit bigger then
the object you wish to climb, just to make sure that the ladder will not be blocked by the object.
In my case this means I cover my prop static. You should now be looking at something like this.
With our newly created brush selected hit Ctrl + T (Tie To Entity) the entity settings box appears.
select func_ladder from the dropdown list. As you will see a ladder has no keyvalues nor flags, so all
we do is press apply and we have a ladder entity! This entity is invisible
in game so we don't have to see
the ugly red ladder texture and it is what is actually climbed by the player. Compile and run!
Final Result
Wasn't that simple? Sometimes it does not have to be that hard. Should you ever decide to do ladders in
Half-Life 2 then that is a different story altogether. Keep in mind that if you make a ladder that is not mounted
to anything then it is custom to only make the "right" side climbable since a player does not wish to climb all the
way up a ladder just to find he's on the wrong side. That's all for now, go create some nice and imaginative ladders!
I hope this tutorial taught you something, should you have any comments or suggestions feel free to contact
me at Unarmedmaps@gmail.com.
//Unarmed
Back to Tutorials Page
|