Tutorial / Tools > World
Map Gate
Gates that take players to another map (or another server).
What it does
A map gate is an upright portal on the floor that leads to another map. A GMod server runs one map for everyone. So a gate either changes the map for everyone after a countdown, or offers the player to join another server.
A gate can start the change when anyone walks in, when every player is inside, or when a percentage of players is inside. For the last two, the countdown stops if too many players walk out.
Gates are saved per map. On the new map, players arrive next to a matching gate, so you can build a way back.
Where to find it
Q menu > KGX's Admin Toolbox > World > Map Gate.
Admins can use the tool, and players who are given it in Settings > Player Access. Player Access warns that this also lets them edit map gates, which can change the map for everyone. The Map gates work (superadmins) switch can only be changed by superadmins.
Admins only (v3.6.11.3): this tool sets up the server, so it cannot be given to players; it is greyed out in Settings > Player Access.
Controls
| Key | What it does |
|---|---|
| Left click | Place a gate on the floor (it faces you) |
| Right click | Give the aimed gate the current settings |
| Reload | Remove the aimed gate |
While you hold the tool, a white outline shows where the next gate goes. You must aim at the floor.
The panel
| Option | What it does | Default |
|---|---|---|
| Map gates work (superadmins) | Turns all map gates on or off (kgxat_gates). |
On |
| Gate does | See "The gate modes" below. | Anyone walks in |
| Map it leads to | The map name, for example gm_flatgrass. It must be installed on the server (except for other-server gates). |
gm_construct |
| Pick an installed map... | Opens a list of installed maps with a filter. Double-click one to use it. | |
| Name of this gate | Its name. Other maps' gates can point players to it. | Empty |
| Arrive at the gate named (on the other map) | Where players come out on the new map. | Empty |
| Text above the gate (empty = To <map>) | The title shown above the portal. | Empty |
| Countdown (seconds) | Time before the map changes, 0-120. | 10 |
| Players needed (percent) | For the percent mode, 1-100. | 60 |
| Width | 32-512. | 96 |
| Height | 48-512. | 128 |
| Other server address (ip:port) | For the other-server mode. | Empty |
| Only admins can use it | Only admins start the gate, and only admins are counted. | Off |
| Reset to defaults | Puts the options above back to their defaults. | |
| Cancel a running gate countdown | Stops a gate's map change in progress. |
Map gates on this map
A list of every gate with the columns #, Gate (name, target map and mode) and Distance. Double-click a row to go there. Right-click a row for Go there, Rename..., Copy position and Remove. Refresh reloads the list. Remove all map gates on this map... removes every gate after a confirmation.
The gate modes
| Mode | What happens |
|---|---|
| Anyone walks in: the map changes for everyone | The first player to walk in starts the countdown. Everyone is told who went through. |
| Every player is inside: the map changes | The text shows "here / needed players in the gate". The countdown starts when all players are inside. |
| Enough players are inside (percent): the map changes | Like the above, with Players needed (percent) of the players. |
| Send the player to another server (they are asked first) | GMod asks the player whether to join the server at Other server address (ip:port). |
How to use it
Link two maps
- On the first map, set Gate does to Anyone walks in.
- Click Pick an installed map... and double-click the target map.
- Type a Name of this gate, for example "To Flatgrass".
- Aim at the floor and left-click. The gate faces you.
- Go to the other map and build a gate that leads back to the first map.
- Players who travel now arrive next to the gate that leads back.
Make a group vote by standing in a gate
- Set Gate does to Every player is inside or Enough players are inside (percent).
- For percent, set Players needed (percent).
- Place the gate. When enough players stand in it, the countdown starts.
Send players to another server
- Set Gate does to Send the player to another server.
- Enter Map it leads to and Other server address (ip:port).
- Place the gate. Players who walk in get GMod's join question.
Settings and commands
| Setting | What it does | Default | Range |
|---|---|---|---|
kgxat_gates |
Map gates work (walking into one changes the map or offers another server). | 1 | 0-1 |
Tips and limits
- Arriving: players come out next to the gate named in Arrive at. If it is empty, next to the gate there that leads back to this map. If there is none, at the normal spawn.
- Arrival placement only applies for 5 minutes after the map change.
- After arriving, players have 5 seconds before a gate can pick them up again.
- Only living human players count. A player is inside when within 20 units of the gate's plane.
- Turning gates off, or cancelling the map change in Utilities > Maps, stops a running countdown.
- Right click keeps a gate's name unless you type a new one.
- A gate's text is visible within 1500 units; the portal within 5000 units.