Black Mesa: Uplink is the recreation of the Half-Life demo (HL: Uplink) released by Valve in early 1999 with featured content that was scrapped from the original storyline.
How do you trigger something beyond a trigger_changelevel, an entity that's in another BSP? Here is how it's done.
Posted by Hezus on Nov 29th, 2012
How to carry over outputs to other BSPs? According to Google searches, many people are trying to figure out how to trigger events in one map, that take place in another map. I wasn't able to find a good tutorial, so after scraping bits of information together, I decided to write this to explain how it works.
First off, I'll quickly run you through the system. You can't directly target an entity in another map. The I/O-system will simply not find the entity you are refering to, since it's not in the same map. Now Source has an entity called env_global to help you with this. It does not relay outputs as you might expect but it puts the game in a "state". This state is carried over to the next BSP. Now in the next BSP you can use a trigger_auto to read the state and then trigger events. Here is a step-by-step tutorial on to set it up:
1. Set up 2 rooms and a corridor with a 90 degree angle.
2. In room 1 create a func_button, a white light, an info_player_start, and an env_global.
Global State to Set: redlighton (type this in the field, it's not in the drop down menu)
Flags: Set Initial State
Flags: Don't Move
Output: OnPressed > global > TurnOn
3. In the corridor, place a trigger_changelevel brush and a info_landmark.
New Map Name: lvlchange2
Landmark Name: lvl_lvl2
Room1 might look a bit like this now:
4. Now save your map as lvlchange1. Save it again as lvlchange2 and load up that map.
5. In lvlchange2, delete the info_player_start, func_button and env_global.
6. Now move the trigger_changelevel a bit towards the direction the player comes from. If he transitions into the next map, the trigger to lvlchange1 should be behind him. If the player touches the trigger_changelevel after the level change, you'll be stuck in an endless loop. Now change the properties:
New Map Name: lvlchange1
Note that the info_landmark should remain in the same position. This is the engines anchor point for level changes. All entities and geometry should always be the same relative from this position in both maps. You can actually select the entire map and move it somewhere else on the grid, as long as the distances between the landmark and the rest of the map remains the same.
7. In room2 set up a light and give it a red colour and the properties:
Flags: Initially Dark
8. Now set up a trigger_auto.
Global State to Read: redlighton (type it)
Output: OnMapTransition > red_light > Toggle
Room 2's view:
9. All done! Compile both maps and load up lvlchange1. Before pressing the button, go into the other room to check if it's dark. Then go back and press the button in room 1. Now go through the corridor and there should be a red light in room2.
The button triggers the env_global and sets the game into the "redlighton" state. The trigger_auto reads that the "redlighton" state is activated and then fires it's outputs.
Example map can be downloaded here.