Usage
The simplest example involves creating a crate that you make disappear -
- Create a crate (func_wall) and give it a Name (targetname) of crate1.
- Place an env_render in your level, near the crate. Give it a Name of crate1_render. Set its target to crate1. Set its render mode to 'texture' (2), and its fx amount to '0'.
- Create a func_button and set its target to crate1_render.
When the button gets pressed, the crate disappears. Note that you could use a
multi_manager and a string of
env_render entities to make the crate gradually fade out of existence rather than disappear suddenly.
This effect is useful for creating the illusion of entities that are bound together in some impossible way (at least for the engine). For example, if you wanted a tank to drive onto a field then start firing, that would seem to imply a
func_train (for the movement) and a
func_tank (for the firing) being bound together. Instead, the
func_tank was always sitting on the field, but it started invisible. When the
func_train drove out to the
func_tank position, two things happen - the
func_train is triggered invisible (as the above crate example), and the
func_tank is triggered to be visible.
Note: in the above example with the tanks, its important to restrict the player from interacting with the "invisible tank" as this would ruin any sense of illusion that has been created.