WiseClipped: Source Clipping
Jump to navigation
Jump to search
This tutorial was originally created by wisemx. It was originally posted on SDKnuts.net.
This is an expanded version of the tutorial as done in wiseClip.
Introduction
In this project we are going to create clipped areas that will:
- Block the Player.
- Block NPC’s (We’ll use a npc_zombie)
- Block NPC Line Of Sight. The Zombie won’t see us until we step forward.
- Block light. Create a shadow.
- Block a Physics object but let the Player through.
Note:In this tutorial NWB means “Normal World Brush”. An NWB is a brush not tied to an entity and simply is the most basic object you can create in Hammer.
Creation
1) NWB textured entirely with “Block LOS”.
- tools/toolsblock_los
- Using this texture will Block the Line of Sight for NPC’s.
- In this example, the Zombie can not see the Player until the Player passes through this invisible wall.
2) NWB textured entirely with “Player Clip”.
- tools/toolsplayerclip
- The Player can not pass through the invisible Player Clip walls.
- Notice on the left side the Player can go up a ramp they can not see.
3) NWB textured entirely with “NPC Clip”.
- tools/toolsnpcclip
- NPC’s can not pass through this invisible wall, but the Player can.
4) func_brush block that does not cast a shadow.
- tools/toolsblocklight
- One half of the front of that func_brush has a NWB textured entirely with “Block Light”.
5) NWB textured entirely with “No Draw”.
- tools/toolsnodraw
- Even though this block will be invisible because we have textured it with nodraw it will still cast a shadow and it will be solid to the Player and physics objects, like the bucket resting on top of it.
6) func_clip_vphysics textured entirely with “No Draw”.
- This entity does not block the Player but it does block Physics entities, like the func_physbox resting on top of it.
- The Player can crouch down and get under the crate but the crate can not pass through. This is very useful for some of your more : creative designs.
- For example, in the dm_horse sample map on the Files page I created two invisible func_clip_vphysics ’s to set the boundaries for a Trap door.
- Before I created those boundaries the Trap door would go around in circles, right through the floor.
7) trigger_once entity used in this project to trigger the Zombie Spawn.
- This isn’t a Clip at all but it’s a close cousin.
- trigger_once and trigger_multiple are easy to create entities you can use in any Single-Player or Multi-Player game.
- In this example I’ve created, Spawned, a NPC Zombie to show how the “Block LOS” texture works and the “NPC Clip” texture. The Zombie doesn’t do anything except hate the Player.
- I believe the Zombie is the only part of this project not compatible with CS:Source.
Once the map from this project is running:
- The Zombie spawns but can not see the Player.
- When the Player steps out of the tiled floor area the Zombie will see the Player but will not be able to get out of its invisible cage.
- If the Player goes along the left wall they will go up an invisible ramp.
- If the Player goes along the right wall they will come to an invisible barrier.
- The Player can walk into the square with the Zombie but the poor Zombie can not escape from the squared area.
- In the area with the blocks the Player will see several effects;
- The block on the left will only have a small shadow, caused by the NWB textured with “Block Light”.
- The Block in the center will be invisible but neither the Player nor the bucket can pass through it. There will be a full normal shadow.
- The block on the right is invisible and both the Player and the bucket can pass through it but the Crate can not. The Player can also shoot through this block.
Please refer to my tutorial on Player Clips if you are not sure now to create these brushes.
Note:The hole in the floor is caused by the 2 NWB’s, floor and center block textured with nodraw, being mated.
This could be fixed by allowing at least 1 unit of space between these brushes.