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
VehicleAttachRequestEvent
DescriptionEvent for request attachingParent
EventFunctions
emptyNew
DescriptionCreate instance of Event classDefinition
emptyNew()Return Values
table | self | instance of class event |
14 | function VehicleAttachRequestEvent.emptyNew() |
15 | return Event.new(VehicleAttachRequestEvent_mt) |
16 | end |
new
DescriptionCreate new instance of eventDefinition
new(table info)Arguments
table | info | attach info [attacherVehicle, attachable, attacherVehicleJointDescIndex, attachableJointDescIndex] |
table | instance | instance of event |
22 | function VehicleAttachRequestEvent.new(info) |
23 | local self = VehicleAttachRequestEvent.emptyNew() |
24 | self.attacherVehicle = info.attacherVehicle |
25 | self.attachable = info.attachable |
26 | self.attacherVehicleJointDescIndex = info.attacherVehicleJointDescIndex |
27 | self.attachableJointDescIndex = info.attachableJointDescIndex |
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 VehicleAttachRequestEvent:readStream(streamId, connection) |
36 | self.attacherVehicle = NetworkUtil.readNodeObject(streamId) |
37 | self.attachable = NetworkUtil.readNodeObject(streamId) |
38 | self.attacherVehicleJointDescIndex = streamReadUIntN(streamId, 7) |
39 | self.attachableJointDescIndex = streamReadUIntN(streamId, 7) |
40 | self:run(connection) |
41 | end |
run
DescriptionRun action on receiving sideDefinition
run(integer connection)Arguments
integer | connection | connection |
57 | function VehicleAttachRequestEvent:run(connection) |
58 | if not connection:getIsServer() then |
59 | if self.attacherVehicle ~= nil and self.attacherVehicle:getIsSynchronized() then |
60 | self.attacherVehicle:attachImplementFromInfo(self) |
61 | end |
62 | end |
63 | end |
writeStream
DescriptionCalled on server side on joinDefinition
writeStream(integer streamId, integer connection)Arguments
integer | streamId | streamId |
integer | connection | connection |
47 | function VehicleAttachRequestEvent:writeStream(streamId, connection) |
48 | NetworkUtil.writeNodeObject(streamId, self.attacherVehicle) |
49 | NetworkUtil.writeNodeObject(streamId, self.attachable) |
50 | streamWriteUIntN(streamId, self.attacherVehicleJointDescIndex, 7) |
51 | streamWriteUIntN(streamId, self.attachableJointDescIndex, 7) |
52 | end |