Script v1_7_1_0
- AI
- Animals
- Collections
- Contracts
- Debug
- Economy
- Elements
- EnvironmentalScore
- Errors
- Events
- GUI
- Handtools
- Hud
- I3d
- Input
- Jobs
- Maps
- Materials
- Misc
- Objects
- Parameters
- Placeables
- Placement
- Player
- Shop
- Sounds
- Specialization
- Specializations
- StateMachine
- Statistics
- Tasks
- Triggers
- Utils
- Vehicles
Engine v1_7_1_0
- AI
- Animation
- Camera
- Entity
- Fillplanes
- general
- General
- I3D
- Input
- Lighting
- Math
- Network
- Node
- NoteNode
- Overlays
- Particle System
- Physics
- Rendering
- getMaterialCustomShaderFilename
- getMaterialCustomShaderVariation
- getMaterialDiffuseMapFilename
- getMaterialDiffuseMapHasAlpha
- getMaterialEmissiveMapFilename
- getMaterialEmissiveMapHasAlpha
- getMaterialGlossMapFilename
- getMaterialHasRefractionMap
- getMaterialIsAlphaBlended
- getMaterialIsAlphaTested
- getMaterialNormalMapFilename
- getMaterialNormalMapFormat
- getMaterialReflectionMapScaling
- setMaterialCustomMapFromFile
- setMaterialCustomShaderVariation
- setMaterialDiffuseMapFromFile
- setMaterialGlossMapFromFile
- setMaterialNormalMapFromFile
- Scenegraph
- Shape
- Sound
- Spline
- String
- Terrain Detail
- Text Rendering
- Tire Track
- VoiceChat
- XML
Foundation Reference
TrailerToggleTipSideEvent
DescriptionEvent for toggle trailer tippingParent
EventFunctions
emptyNew
DescriptionCreate instance of Event classDefinition
emptyNew()Return Values
table | self | instance of class event |
13 | function TrailerToggleTipSideEvent.emptyNew() |
14 | local self = Event.new(TrailerToggleTipSideEvent_mt) |
15 | return self |
16 | end |
new
DescriptionCreate new instance of eventDefinition
new(table object, boolean isStart, table tipTrigger, integer tipSideIndex)Arguments
table | object | object |
boolean | isStart | is start |
table | tipTrigger | tip trigger |
integer | tipSideIndex | index of tip side |
24 | function TrailerToggleTipSideEvent.new(object, tipSideIndex) |
25 | local self = TrailerToggleTipSideEvent.emptyNew() |
26 | self.object = object |
27 | self.tipSideIndex = tipSideIndex |
28 | return self |
29 | end |
readStream
DescriptionCalled on client side on joinDefinition
readStream(integer streamId, integer connection)Arguments
integer | streamId | streamId |
integer | connection | connection |
35 | function TrailerToggleTipSideEvent:readStream(streamId, connection) |
36 | self.object = NetworkUtil.readNodeObject(streamId) |
37 | self.tipSideIndex = streamReadUIntN(streamId, Trailer.TIP_SIDE_NUM_BITS) |
38 | |
39 | self:run(connection) |
40 | end |
run
DescriptionRun action on receiving sideDefinition
run(integer connection)Arguments
integer | connection | connection |
54 | function TrailerToggleTipSideEvent:run(connection) |
55 | if not connection:getIsServer() then |
56 | g_server:broadcastEvent(self, false, connection, self.object) |
57 | end |
58 | |
59 | if self.object ~= nil and self.object:getIsSynchronized() then |
60 | self.object:setPreferedTipSide(self.tipSideIndex, true) |
61 | end |
62 | end |
writeStream
DescriptionCalled on server side on joinDefinition
writeStream(integer streamId, integer connection)Arguments
integer | streamId | streamId |
integer | connection | connection |
46 | function TrailerToggleTipSideEvent:writeStream(streamId, connection) |
47 | NetworkUtil.writeNodeObject(streamId, self.object) |
48 | streamWriteUIntN(streamId, self.tipSideIndex, Trailer.TIP_SIDE_NUM_BITS) |
49 | end |