Class NetworkGameEvent

See also:

send

send([data[, connection[, mode[, rules]]]])

Sends a game event to one or more computers.

data is a bitstream to send with the event.

connection is a connection ID to send the event on. If it's 0, the rules parameter decides who to send to.

mode is one of these values (default is SendMode.ReliableOrdered): SendMode.ReliableUnordered : The events always arrive, but may come in a different order than sent. SendMode.ReliableOrdered : The events always arrive and in the order sent. SendMode.Unreliable : The events may or may not arrive and in any order.

rules decides what computers to send the event to if connection is 0 or left out. It can be any (or sometimes a sum) of: RepRule.Auth2All : Event is sent from the server to clients. RepRule.Auth2Owner : Event is sent from the server to clients owning the node. RepRule.Auth2Proxy : Event is sent from the server to clients not owning the node. RepRule.None : Event is not sent. RepRule.Owner2Auth : Event is sent from clients owning the node to the server.

A valid combination is (RepRule.Owner2Auth + RepRule.Auth2All) which sends the event from owners to the server or from the server to all clients (depending on if we're the server or not).

 
main/modding_docs/lua/networkgameevent.txt · Last modified: 2007/12/18 19:02 (external edit)
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki