Script v1.7.1.0
- AI
- Animals
- Contracts
- Debug
- Economy
- Effects
- Events
- Farms
- GUI
- Handtools
- I3d
- Materials
- Misc
- Objects
- Placeables
- Player
- Shop
- Sounds
- Specializations
- Triggers
- Utils
- Vehicles
- Weather
Engine v1.7.1.0
- AI
- Animation
- Camera
- Entity
- Fillplanes
- General
- I3D
- Input
- Lighting
- Math
- Network
- streamGetNumOfUnreadBits
- streamGetReadOffset
- streamGetWriteOffset
- streamReadBool
- streamReadFloat32
- streamReadInt16
- streamReadInt32
- streamReadInt8
- streamReadIntN
- streamReadManualTimestamp
- streamReadString
- streamReadUInt16
- streamReadUInt8
- streamReadUIntN
- streamSetReadOffset
- streamSetWriteOffset
- streamWriteBool
- streamWriteFloat32
- streamWriteInt16
- streamWriteInt32
- streamWriteInt8
- streamWriteIntN
- streamWriteManualTimestamp
- streamWriteStream
- streamWriteString
- streamWriteUInt16
- streamWriteUInt8
- streamWriteUIntN
- Node
- Overlays
- Particle System
- Physics
- Rendering
- Scenegraph
- Shape
- Sound
- Spline
- String
- Terrain Detail
- Text Rendering
- Tire Track
- XML
- general
Foundation Reference
SendLocomotiveToSplinePositionEvent
ParentEventFunctions
emptyNew
DescriptionDefinitionemptyNew()Code
12 | function SendLocomotiveToSplinePositionEvent:emptyNew() |
13 | local self = Event:new(SendLocomotiveToSplinePositionEvent_mt) |
14 | return self |
15 | end |
new
DescriptionDefinitionnew()Code
19 | function SendLocomotiveToSplinePositionEvent:new(vehicle, splinePosition) |
20 | local self = SendLocomotiveToSplinePositionEvent:emptyNew() |
21 | self.vehicle = vehicle |
22 | self.splinePosition = splinePosition |
23 | return self |
24 | end |
readStream
DescriptionDefinitionreadStream()Code
28 | function SendLocomotiveToSplinePositionEvent:readStream(streamId, connection) |
29 | self.vehicle = NetworkUtil.readNodeObject(streamId) |
30 | self.splinePosition = streamReadFloat32(streamId) |
31 | self.vehicle:setRequestedSplinePosition(self.splinePosition) |
32 | end |
writeStream
DescriptionDefinitionwriteStream()Code
36 | function SendLocomotiveToSplinePositionEvent:writeStream(streamId, connection) |
37 | NetworkUtil.writeNodeObject(streamId, self.vehicle) |
38 | streamWriteFloat32(streamId, self.splinePosition) |
39 | end |