HL2 and CS:Source Tutorials

Like such as the NIPPER
Finme
Posts: 2
Joined: Mon Dec 05, 2005 10:13 am

Post by Finme » Mon Dec 05, 2005 10:33 am

Humm... I'd like to hear how on earth can you make cameras to CS source, since I have used last 6 hours to try to find out. I know that assault has camera and would chec it from there but I cant acces it with hammer... Well, any ideas?

EDIT (Short time after, just 2H): Dam, now I remembe, obsolute things wont mean that it wouldnt work. So, I just got to use point_camera. And I wasted 6 hours to realise that. :lol:

And... Most of these I knew already, exept that what sebastian sed, tho I knew it was possible, just not howto. (Didnt vqui do something like that too?)

And... I think I could add something random my self...

HOW TO MAKE FAKE WALLS
Okey, there is many ways... I use:
1. I make a wall, then turn it to door ("tie to enity" and then func_door)
2. Make it passable
Nothing more, thats simple.

HOW TO MAKE ONE WAY SEE THROUGH WALLS
So, if you want that place, where only few can find a way to enter/is hard to get in, has advance like that you can shoot peaple from there but they cant shoot you/it is wery difficult for they to shoot you:
1. Create normal wall
2. hit sift and A at the same time.
3. Now you can select sides of that wall one by one.
4. Select the inner side of that wall (I mean: The side that you want to see trhought)
5. Search a textrue that is complitely black/dark
6.hit apply. Now you should see through it from side you chose, and from other side you should not.
Incase you cant see throug it: Select other texture.
Incase you can see through from all directions: Take that texture apling tool agen and choose ONLY ONE side of that wall this time. ;)

Okey, those quides really were rubbish, and all you probably knew em already... Well, Im not gonna add "Howto make a button" since that is known by every mapper.
ayeyah
Posts: 5046
Joined: Fri Mar 12, 2004 10:36 pm
Location: =)

Post by ayeyah » Mon Dec 05, 2005 7:26 pm

Finme, your one way wall won't work properly sometimes, especially if the texture is not transparent (has an alpha layer). The side you want to see through must either be textured with NODRAW (or NULL in 1.6), or use a transparent texture (you got the black part right, but it has to have the little icon showing its a transparent texture, otherwise it might just be pure black), or in 1.6, use {blue and turn the brush into a func_wall at rendermode solid renderamt 255.

Fake walls: Try func_illusionaries :) (or func_brush with the passable property in Source), because doors are still subject to opening and closing, whereas walls are static. In 1.6, you can also have a fake wall block VIS using @ textures
STEAM_0:0:2611885
Finme
Posts: 2
Joined: Mon Dec 05, 2005 10:13 am

Post by Finme » Tue Dec 06, 2005 11:19 am

Yeah, well I sed there would be other ways... And what comes to those oneway walls: I have never had any problems with those... Now that I checed, it has always had that little T in it... I never payd attention for that kind of little thing...

Oh well, I wouldnt use nodraw, since then there is no way to tell where it is. I mean, with out shooting at it. (Or simply walking agaist it.)
Well, it is good in some situisations. (And seems like i cant even spell...)

And that fake wall thing: Well, I may want to "open" it sometime, if I dont I just make it locked/prevent opening otherways.
The main reason is that func_door is close to func_detail (that comes as standard when tieing to entity) and im lazy. :-) Just few clicks and its done + I may scare some players by starting to make that wall fall on em. ;)

Well, ewry1 has their own ways, and Im not going to argue with some1 clearly more advanced...
Primus7
Posts: 10
Joined: Tue Dec 06, 2005 5:42 pm

Post by Primus7 » Thu Dec 29, 2005 3:55 pm

How to make a falling ladder.

By Primus7

I have recently tested this out and tell me what you think. i thought this would be handy for a city level. this is very simple to do so this wont take more than 5 minutes.

first of all take a normal ladder texture (metal/metalladder001a).
make a box with these dimensions: 129 units high, 2 units long and 18 units width.

you may need to fit the texture with the fit button which is located on the texture menu. (shift a while selecting the object). once you have that done make the texture a door with control T. tie it to the door and make its delay before reset 0. then set its move direction to down.
make its name ladder. Also you can set the sound and the speed of which the ladder drops. i set it to 150

now for another easy part. select the ladder texture and make a box with the same demensions as your ladder but only set it infront of it so that its not touching the ladder.tie this to func_brush. set its parent to ladder and now you are finished with the ladder. now to make a activator to make the ladder drop.

make a nodraw texture directly in the ladder,make its length as small as possible. this will prevent people from not being able to running behind the ladder. Tie this entity to a func_button.go to flags and make sure only damage activates is the only box checked.Make its parent ladder and were set. now for some inputs and outputs. select the output tab and select the add button. select the new command it has added into the outputs and set it up like this.

my output named: ondamaged
targets entities named : ladder
via this input: open

you have now successfully created a ladder thats able to drop down to the floor as it is shot. and as a tip. You can change the ladders hight to make sure it reaches the floor (thats just a tip just in case you have it set to high up for it to reach the ground.). if its to low then it will go through the floor. thanks for reading!
ayeyah
Posts: 5046
Joined: Fri Mar 12, 2004 10:36 pm
Location: =)

Post by ayeyah » Thu Dec 29, 2005 7:54 pm

Bumpmapping for HL2 and mods

You need the following: If the files go down I'll mirror them, but it's important that you get the correct Photoshop plugins version, because the new one doesn't work with the generator script.

Assuming you have Photoshop installed, install the plugins, and extract the contents of HL2textures.rar to C:\ ONLY, because the script won't work elsewhere. Don't worry, it has its own subdirectory.

The next part I'm too lazy to type out so here it is from the generator script's readme:
There is one known problem with the script. You might get the following error when running the script:


The command "<unknown>" is not currently available
Line:1250
->executeAction( id7, desc3, DialogModes.NO );


If you get this error then here is the solution:


1. Search your computer for the file ScriptListener.8li which should be in the directory:

C:\Program Files\Adobe\Photoshop CS\Scripting Guide\Utilities


2. Copy the file ScriptListener.8li to the directory:

C:\Program Files\Adobe\Photoshop CS\Plug-Ins\Adobe Photoshop Only\Automate


3. Open Adobe Photoshop CS.


4. Go to File > New and then just press OK.


5. Go to Filter > nvTools > NormalMapFilter... and then just press OK again.


6. Close Adobe Photoshop.


7. Open the file ScriptingListenerJS.log, in the root of your C:\, with Windows Text-Editor and you will see something
like the following:


// =======================================================
var id1 = charIDToTypeID( "Ntfy" );
var desc1 = new ActionDescriptor();
var id2 = charIDToTypeID( "What" );
var id3 = charIDToTypeID( "Ntfy" );
var id4 = charIDToTypeID( "FrId" );
desc1.putEnumerated( id2, id3, id4 );
executeAction( id1, desc1, DialogModes.NO );

// =======================================================
var id5 = charIDToTypeID( "Mk " );
var desc2 = new ActionDescriptor();
var id6 = charIDToTypeID( "Nw " );
var desc3 = new ActionDescriptor();
var id7 = charIDToTypeID( "Md " );
var id8 = charIDToTypeID( "RGBM" );
desc3.putClass( id7, id8 );
var id9 = charIDToTypeID( "Wdth" );
var id10 = charIDToTypeID( "#Rlt" );
desc3.putUnitDouble( id9, id10, 2048.000000 );
var id11 = charIDToTypeID( "Hght" );
var id12 = charIDToTypeID( "#Rlt" );
desc3.putUnitDouble( id11, id12, 2048.000000 );
var id13 = charIDToTypeID( "Rslt" );
var id14 = charIDToTypeID( "#Rsl" );
desc3.putUnitDouble( id13, id14, 72.000000 );
var id15 = stringIDToTypeID( "pixelScaleFactor" );
desc3.putDouble( id15, 1.000000 );
var id16 = charIDToTypeID( "Fl " );
var id17 = charIDToTypeID( "Fl " );
var id18 = charIDToTypeID( "Wht " );
desc3.putEnumerated( id16, id17, id18 );
var id19 = charIDToTypeID( "Dpth" );
desc3.putInteger( id19, 8 );
var id20 = stringIDToTypeID( "profile" );
desc3.putString( id20, "sRGB IEC61966-2.1" );
var id21 = charIDToTypeID( "Dcmn" );
desc2.putObject( id6, id21, desc3 );
executeAction( id5, desc2, DialogModes.NO );

// =======================================================
var id22 = stringIDToTypeID( "d9543b0c-3c91-11d4-97bc-00b0d0204936" ); <----------- MY KEY IS d9543b0c-3c91-11d4-97bc-00b0d0204936
var desc4 = new ActionDescriptor();
var id23 = charIDToTypeID( "Amnt" );
var id24 = charIDToTypeID( "#Prc" );
desc4.putUnitDouble( id23, id24, 1.000000 );
var id25 = charIDToTypeID( "filT" );
var id26 = charIDToTypeID( "typT" );
var id27 = charIDToTypeID( "fil4" );
desc4.putEnumerated( id25, id26, id27 );
var id28 = charIDToTypeID( "conV" );
var id29 = charIDToTypeID( "typC" );
var id30 = charIDToTypeID( "cnv8" );
desc4.putEnumerated( id28, id29, id30 );
var id31 = charIDToTypeID( "alph" );
var id32 = charIDToTypeID( "typA" );
var id33 = charIDToTypeID( "alp1" );
desc4.putEnumerated( id31, id32, id33 );
var id34 = charIDToTypeID( "wrap" );
desc4.putBoolean( id34, true );
executeAction( id22, desc4, DialogModes.NO );

// =======================================================
var id35 = charIDToTypeID( "Cls " );
var desc5 = new ActionDescriptor();
var id36 = charIDToTypeID( "Svng" );
var id37 = charIDToTypeID( "YsN " );
var id38 = charIDToTypeID( "N " );
desc5.putEnumerated( id36, id37, id38 );
executeAction( id35, desc5, DialogModes.NO );

You will quickly notice that it shows your computer's key for the Nvidia Filter. I have marked my computer's
key above with an arrow just for example.


8. Copy your computer's key from the log file into my script's .js files, replacing the original key with the
one you just copied from the log file.

9. Go to C:\Program Files\Adobe\Photoshop CS\Plug-Ins\Adobe Photoshop Only\Automate and rename the file
ScriptListener.8li to ScriptListener.off so that Photoshop stops recording to the log file. If you want to use
script listener again, just rename the file back to ScriptListener.8li and it will start recording to the log file
again.


Everything should work after this unless the original and new keys are exactly the same.
Create up to 1000 standard 24 or 32bit TGAs with 1:1 ratios ONLY (128x128, 256x256, 512x512, 1024x1024, or 2056x2056). Move them to C:\HL2Textures\Texture Input. Open Photoshop, and open the corresponding .js file in C:\HL2textures. It might take 10-15 seconds per texture, but the resulting normalmap will have the original texturename will _normal appended, and placed under C:\HL2textures\Normal Output.

Compile BOTH the base texture and normalmap into VTFs. The basetexture VMT should be based like this for normal non-model materials; as an example, I'm using a wooden-like texture "blah" under "materials/hello":

Code: Select all

"LightmappedGeneric"
{
	"$basetexture" "hello/blah"
	"$bumpmap" "hello/blah_normal"
	"$surfaceprop" "wood"
//The below variables are only if you want specular (reflective) bumpmapping
	"$envmap" "env_cubemap"
	"$envmaptint" "[.05 .05 .05]" 
}
The RGB values in $envmaptint can range from [0 0 0] to [1 1 1], with the latter being a mirror-like reflective surface. I used .05 to represent a semi-glossy wooden texture. Values of 0.3 are good for glossy paint, and 0.1 or so for wet sand.

In Hammer, work as you normally would with the base texture; don't worry about the purpley normalmaps. Compile, start up a game, and make sure mat_bumpmap is 1. Voila!

ninjaaa!!1
STEAM_0:0:2611885
User avatar
HomicidalApe
Posts: 5872
Joined: Tue Oct 14, 2003 9:56 pm
Location: distant shores
Contact:

Post by HomicidalApe » Fri Mar 09, 2007 3:46 pm

Un-Stickied because the thread is getting outdated with missing pictures. this thread is still linked to in the new hl2/css sticky though.
"it's basically valve's fault." - Joe
"I have a very predictable pattern here: I make smarmy comments and call people on bullshit. If you start an asinine argument with me, I will not back down." - Hellboy
"the reign of hellboy has seen unprecedented prosperity! viva la hellboy! - Joe
Post Reply