addNetworkHandler: Difference between revisions

no edit summary
No edit summary
No edit summary
 
Line 11: Line 11:
|note = Use [[triggerNetworkEvent|triggerNetworkEvent]] call a custom network event. Clients can only trigger server-side handlers, while the server can trigger a handler on either end.
|note = Use [[triggerNetworkEvent|triggerNetworkEvent]] call a custom network event. Clients can only trigger server-side handlers, while the server can trigger a handler on either end.
|offline = false
|offline = false
|cb2arg1SS = Client client The client that triggered the network event.
|cb2argSS1 = Client client The client that triggered the network event.
|cb2arg2SS = ... vararg The arguments that were triggered with the network event.
|cb2argSS2 = ... vararg The arguments that were triggered with the network event.
|cb2arg1CS = ... vararg The arguments that were triggered with the network event.
|cb2argCS1 = ... vararg The arguments that were triggered with the network event.
|exampleJSCS = addNetworkHandler("walkToPos", function(civilian, x, y) {
|exampleJSCS = addNetworkHandler("walkToPos", function(civilian, x, y) {
     let walkToPos = new Vec2(x, y);
     let walkToPos = new Vec2(x, y);
6,865

edits