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
SetFillUnitIsFillingEvent
DescriptionEvent for toggle fillingParent
EventFunctions
emptyNew
DescriptionCreate instance of Event classDefinition
emptyNew()Return Values
table | self | instance of class event |
13 | function SetFillUnitIsFillingEvent.emptyNew() |
14 | local self = Event.new(SetFillUnitIsFillingEvent_mt) |
15 | return self |
16 | end |
new
DescriptionCreate new instance of eventDefinition
new(table vehicle, boolean isFilling)Arguments
table | vehicle | vehicle |
boolean | isFilling | is filling state |
22 | function SetFillUnitIsFillingEvent.new(vehicle, isFilling) |
23 | local self = SetFillUnitIsFillingEvent.emptyNew() |
24 | self.vehicle = vehicle |
25 | self.isFilling = isFilling |
26 | return self |
27 | end |
readStream
DescriptionCalled on client sideDefinition
readStream(integer streamId, integer connection)Arguments
integer | streamId | streamId |
integer | connection | connection |
33 | function SetFillUnitIsFillingEvent:readStream(streamId, connection) |
34 | self.vehicle = NetworkUtil.readNodeObject(streamId) |
35 | self.isFilling = streamReadBool(streamId) |
36 | self:run(connection) |
37 | end |
run
DescriptionRun action on receiving sideDefinition
run(integer connection)Arguments
integer | connection | connection |
51 | function SetFillUnitIsFillingEvent:run(connection) |
52 | if self.vehicle ~= nil and self.vehicle:getIsSynchronized() then |
53 | self.vehicle:setFillUnitIsFilling(self.isFilling, true) |
54 | end |
55 | |
56 | if not connection:getIsServer() then |
57 | g_server:broadcastEvent(SetFillUnitIsFillingEvent.new(self.vehicle, self.isFilling), nil, connection, self.vehicle) |
58 | end |
59 | end |
writeStream
DescriptionCalled on server sideDefinition
writeStream(integer streamId, integer connection)Arguments
integer | streamId | streamId |
integer | connection | connection |
43 | function SetFillUnitIsFillingEvent:writeStream(streamId, connection) |
44 | NetworkUtil.writeNodeObject(streamId, self.vehicle) |
45 | streamWriteBool(streamId, self.isFilling) |
46 | end |