So basically, I was trying to create a functional teleport that would work in multiplayer maps. I had searched the internet for literally two weeks, slowly piecing together how to actually get a teleport to work in a multiplayer map. Anytime I would follow a guideline, the teleport would work perfectly in the Editor, but not in a multiplayer game. Finally, I got teleports to work in multiplayer.
Here is how to make a multiplayer teleport in Sandbox 2:
Step 1 - Create a Proximity Trigger from the Objects tab of the rollup bar under Entity>Triggers>Proximity Trigger. Drag the Proximity Trigger to where you want the teleport to take place at. *Note, you can scale the Proximity Trigger if you scale all sides evenly. If you do not, it will not work*
Step 2 - Place a Tag Point in your map where you want the player to arrive at after he/she is teleported. Tag Points can be found under the Objects tab of the rollup bar under AI>Tagpoint.
Step 3 - Click on the Proximity Trigger and click "Create Flowgraph" underneath its properties in the rollup bar. This will bring up the flowgraph menu. On the top of the flowgraph under the View tab, make sure that all categories are checked off, including under the "Components" section.
Step 4 - Right click on the graph and click "Add selected entity". You may need to then click "Fit Graph To View".
Step 5 - Right click on the graph and add a BeamEntity node under Entity>BeamEntity.
Step 6 - Right click on the graph again and add a EntityPos node under Entity>EntityPos
Step 7 (optional) - If you want to add a sound effect to your teleport, right click on the graph and add a PlaySound node under Sound>PlaySound. If you want to add a message that will display when the user is teleported, add a DisplayInfoMessage node by right clicking on the graph and navigating to HUD>DisplayInfoMessage.
Step 8 - Connect "Sender" from the Proximity Trigger node to the "Input entity" section of the BeamEntity. Connect "Sender" to the "Input Entity" section of the PlaySound node as well (if you're adding sound).
Step 9 - Connect "Enter" from the Proximity Trigger node to "Beam" on the Beam Entity node, to "Display" of the DisplayInfoMessage node (if you're adding a message), and to "Play" of the PlaySound node (if you're adding sound).
Step 10 - Navigate into your map now and select the Tagpoint that you placed in the map. Now go back to your flowgraph and right click on your EntityPos node. Click "Assign Selected Entity". Now connect "Pos" from the EntityPos node to the "Position" of the BeamEntity node; connect "Rotate" from the EntityPos node to "Rotation" of the BeamEntity node; connect "Scale" from the EntityPos node to "Scale" of the BeamEntity node.
Step 11 (optional) - Add the desired sound effect to your teleport by clicking on the PlaySound node, navigating to the right side of the flowgraph under the "Sound" category, and clicking on the little folder. Select the desired sound and click ok. Add the desired info message by clicking on the DisplayInfoMessage node and clicking in the box on the right side of the flowgraph. Type in your message here and edit the amount of time you want it displayed.
Step 12 (VERY IMPORTANT) - Make sure after you're all done to click somewhere else on the graph (not on a node) and over on the right side of the flowgraph in the drop-down menu "Multiplayer Options", change "ServerOnly" to "ClientOnly".
*It's important to note that the flowgraph must be made from the Proximity Trigger or another object. If you open up the flowgraph editor and make a new Flowgraph, it will not work correctly in multiplayer. You MUST make the flowgraph from an object.*
Congratulations! You now have a basic teleport that functions in multiplayer. I know that this post will not help very many people, as most people have moved on past Sandbox 2 by now; but for people like me still making LAN-based maps, I hope this tutorial helped. I sure wish I had it when I was making maps.
File comment: Flowgraph Picture
Teleport_Flowgraph.jpg [ 580.8 KiB | Viewed 350 times ]