Crosslevel Trigger/Target
Demonstrates how to target things like doors or bridges from one unit map to another.
1.Firstly, create a good
sized room (300x300x300) and place a info_player_start and a light in there.
2. Put a door in the room, anywhere is fine. Give the door a targetname of door and a wait of -1.
3. Place a target_crosslevel_target entity in the map. Give it a target of door, to fire the door, a targetname of cross1, and a spawnflags of 1. The spawnflags is used to match the trigger and targets from one map to another. *NOTE* You can have up to 8 combinations, with each pair having a matching spawnflags. In plain english, you can have, say, 8 different doors that are triggered from one map and are targeted in another.
4. Create a button that will be used to end the map and send you to map #2. Give it a target of start2.
5. Put a target_changelevel in the map and set map to level2 and targetname to start2.
6. Save and compile this map as level1 and open a new map.
7. In the new map, create an exit button, as in level1 with target of start1.
8. Put a target_changelevel in this map with a map of level1 and targetname of start1.
9. Create a second button, to be used to open the door in level1. Give the button a target of opendoor.
10. Place a target_crosslevel_trigger in with a target of cross1, a targetname of opendoor, and a spawnflags of 1 (ties this to the trigger in level1).
11. Save and compile this map as level2.
Perhaps this chart will help make the target and targetnames a bit easier to follow. The yellow shows the target to its targetname and the blue shows how the crosslevels are tied together with spawnflags.
Now when you run level1, you shouldn't be able to open the door, so you hit the exit button to goto level2. In level2 you press the button that opens the door. Return to level1 by hitting the exit button. Back in level1 the door will now be open.
Here are 2 example maps showing the targets/triggers. You may want to open level1 then import level2 into the same map so you can look at all the entities at once, without having to open and close back and forth between the two.
Comments & Questions to
Quake Workshop