How to Use the env_render entity
|
INTRODUCTION Have you been playing Half-Life and you see the evil looking G-Man? You turn you're back for a second and he's gone...where did he go? Ever see the G-Man enter a teleporter and disappear? All this tricks can be accomplished simply with the env_render entity. The env_render is one of the most useful entities in Half-Life. The env_render entity allows you to change the rendering properties of the Half-Life models, like weapons, characters and even brushes you make yourself. If you are unsure what this means it is simply that you can make any object in Half-Life appear or disappear. *Important* The env_render entity can only target objects with a set name. So if you want an object you've created to appear or disappear you must make it a func_wall or an entity that has a name. GETTING STARTED A simple way of illustrating the env_render is to use the modern desk prefab from the random objects list. First construct a rectangular room roughly 320Wx352Lx256H.
Next, insert a modern desk prefab from the random objects prefab library.
Click on the desk and hit Ctrl+T. An object properties box will pop up on your screen, scroll down and choose: func_wall. You must name the desk in order for it to be targeted by the env_render. Under the 'Attributes' heading, select 'Name' and type: desk. Close the Object Poperties window when you are done.
Now use the entity tool - "Name" - 'render' Leaving the 'Renderfx' at zero means the object will become invisible. The lower the number the more transparent the object will be. Close the object properties window. Now you must make a button to trigger the env_render. Select the texture +A~METALSTCH2 from the texture window, and make a block 18Wx4Lx26H. You may notice the switch texture is to big for the size of the block you have created. No problem, select the 'Texture Application Tool' and click on the face of the block. Set the X and Y scale to 50.
Select on the switch block you've created and hit Ctrl+T. At the 'Object Properties' box, scroll down and choose: func_button. Under the 'Attributes' heading. select 'Targetted object' and type: render.
At the top of the Object Properties box, there is a tab labeled 'Flags', click that and check the box labeled 'don't move'. Close the Object Poperties window when you are done. Add an info_player_start, some lights, and make sure the switch is facing the desk so you may see what happens when you use the button. Since this is just a tutorial, you can make the switch floating in the air in front of the desk if you want.
CONCLUSION After you compile and run the level you may notice something, when you use the switch and the desk disappears, you can still interact with it. For this reason, if you use the env_render you must make sure the player cannot interact with the object that seems to disappear. This is a simple use of the env_render, and you can use it in more creative ways. For example, using a multimanger and a string of env_renders produces the effect of an object or model fading slowly out of existence. |
- Razor