Vehicle Body
self:get_syncer
SharedRetrieves the peer id currently holding sync authority over the vehicle body
Syntax
local peer_id = self:get_syncer()Parameters
| No parameters are accepted by this function |
|---|
Returns
| Type | Name | Description |
|---|---|---|
int | peer_id | Peer id that syncs this vehicle body, 0 when the server itself is the syncer |
Examples
local entity = physics.vehicle.create()
core.engine.print("info", "Syncer:", entity:get_syncer())