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
| Name | Type | In forms |
|---|---|---|
| iNetID | integer | all |
| name | string | all |
| f | float | all |
| mode | integer | 2 |
Every form returns
nothing
Example · generated
Form 1, the short one
net = CreateNetworkMessage()NetworkLocalFloat(net, "player", 1.0)DO Sync()LOOPForm 2, with every argument
net = CreateNetworkMessage()NetworkLocalFloat(net, "player", 1.0, 1)DO Sync()LOOPCreateNetworkMessage 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.