Network Messages allow you to create unique script events that are transferred between the server and its clients. These events will then show at the top of the event list in the Script Editor.
When using any network message you must include a Client ID. This is a unique ID assigned to each currently active connection. This ID can be obtained in the Connection Received System Trigger on the server that is hosting. If a server sends a network message to the ID 0, it will broadcast the message to every connected client. A client can send to the ID 0 to send a message to the currently connected server.
General
Display Name – Used to identify the Network Message in the editor.
Scripting ID – Used to identify the Network Message through scripting.
Description – Brief summary of what the Network Message does.
Icon (32×32) – 32×32 image to make it easier to identify your Network Message in the event list.
Complexity – Used to set how the event will be listed in the Script Editor.
Server can send this to clients – When ticked, this will allow the server to execute this script on connected client machines.
Clients can send this to server – When ticked, this will allow connected client machines to execute this script on the server.
Guaranteed delivery (TCP) – When ticked, Network Messages will use reliable TCP to communicate with the client/server. When unticked, Network Messages will instead use the less reliable, but faster, UDP to communicate with the client/server – with a fall back mechanism to use TCP if UDP is unavailable.
Transfer Collections – When ticked, the contents of a Collection will be transferred when the Network Message is executed. You may select multiple Collections.
Transfer Tables – When ticked, the contents of a Table will be transferred when the Network Message is executed. You may select multiple Tables.
Parameters (optional)
By clicking “Add” and “Remove”, you can control which parameters will be available when the Network Message is used. These parameters can also be named separately to identify them using the “Variable Name” text box. An optional tooltip will display for said parameter if the “Tooltip Description” text box is filled.
Text / Number / List
Text – Displays a text box where you can type in letters, numbers and other characters.
Number – Similar to Text, except you can use it to display just numbers. Any text typed into this box will be treated as a Use Value.
List – Contains a custom set list of entries that you can select from. This is useful when you need to pick a choice, that requires more than 2 options. If you pick multiple list options the event will run for each option picked.
Default/Listing – sets the default value that will appear inside the text box. When using a List, you can separate options using a semi-colon (;). Example: Option 1;Option 2;Option 3;Option 4
Direction (Angle) / Rotation (Angle)
Allows you to pick a direction or a rotation/orientation, which is a value between -3.14 and 3.14.
Color / Color with Alpha
Displays a standard Windows color window where you can choose from different swatches or define your own color using RGB values. The alpha option allows you to also specify how transparent the color is.
Time
Displays three text boxes for hour, minute and second time intervals.
Speed
Displays a text box where you can set a numeric value for speed. The number returned will be Number/100, so an input of 10 will actually be an input of 0.1 in the script.
Multi-line Text
Similar to Text, except you are provided with a text box with multiple lines. This provides spaces for a lot more text to be displayed.
X, Y and Z
Allows you to pick co-ordinates on a map visually. To set this up, your custom event must contain a Dynamic List – Map, X, Y and Z parameters. Once you pick a map it will allow you to pick map co-ordinates by clicking on the preview window.
Toggle
Displays two radio buttons that you can choose between. When setting up the script, the value of this parameter will either be 0 or 1.
Ranged Number
Displays a sliding bar between the minimum and maximum values. The value will be set to whatever is specified in the Default text box.
Dynamic List
Displays a list of elements from your project. For elements like Maps, Actors and Doors to Teams, Actor Templates and Sounds/Music.