NetworkLocalFloat

Family: Multiplayer · 2 forms

What it does

NetworkLocalFloat writes to a Multiplayer object: it sets rather than reads. It takes iNetID (an integer), name (a string) and f (a float), and returns nothing. That is the first of 2 forms. iNetID is the id of a Net object, obtained elsewhere in the Multiplayer family.

Syntax

1
NetworkLocalFloat(iNetID integer, name string, f float)
2
NetworkLocalFloat(iNetID integer, name string, f float, mode integer)

Parameters

NameTypeIn forms
iNetIDintegerall
namestringall
ffloatall
modeinteger2

Every form returns

nothing

Example · generated

Form 1, the short one

net = CreateNetworkMessage()NetworkLocalFloat(net, "player", 1.0)DO  Sync()LOOP

Form 2, with every argument

net = CreateNetworkMessage()NetworkLocalFloat(net, "player", 1.0, 1)DO  Sync()LOOP

CreateNetworkMessage is there to give the call something to act on; NetworkLocalFloat is the line that matters. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.

91 commands in Multiplayer