Usage
The env_global seems a bit complicated to use, but it really is quite easy. Here's a brief list of the steps I took in the example map.
- In global1.bsp, i've got a button that activates some things. This button has a multisource master specified (button_master).
- The button_master multisource has a Global State Master of levelpower. This means that the multisource will not be "on" until the levelpower global variable has a state of "on". You must now walk through a hallway, through a level transition, into the global2.bsp map.
- In global2.bsp, i've got a button which targets an env_global.
- The env_global has the following properties:
- Name - level_power
- Global State to Set - levelpower
- Trigger Mode - Toggle
- Initial State - On
- When the button triggers the env_global, the levelpower global variable is created with its state set to On. Each time the button here is pressed, the state of the levelpower global variable will toggle between On and Off. Make sure the power button is on (you'll be able to tell from the texture of the button whether it is on or off), then walk back down the hallway through the level transition into the room you initially started in.
- The button will now be usable, allowing you to turn some things on and off.
- You can go back to the other room and turn the power off, or on, as many times as you like.