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
BunkerSiloOpenEvent
DescriptionEvent for bunker silo openParent
EventFunctions
emptyNew
DescriptionCreate instance of Event classDefinition
emptyNew()Return Values
table | self | instance of class event |
13 | function BunkerSiloOpenEvent.emptyNew() |
14 | local self = Event.new(BunkerSiloOpenEvent_mt) |
15 | return self |
16 | end |
new
DescriptionCreate new instance of eventDefinition
new(table bunkerSilo, float x, float y, float z)Arguments
table | bunkerSilo | bunkerSilo |
float | x | x opening position |
float | y | y opening position |
float | z | z opening position |
table | instance | instance of event |
25 | function BunkerSiloOpenEvent.new(bunkerSilo, x,y,z) |
26 | local self = BunkerSiloOpenEvent.emptyNew() |
27 | self.bunkerSilo = bunkerSilo |
28 | self.x = x |
29 | self.y = y |
30 | self.z = z |
31 | return self |
32 | end |
readStream
DescriptionCalled on client side on joinDefinition
readStream(integer streamId, integer connection)Arguments
integer | streamId | streamId |
integer | connection | connection |
38 | function BunkerSiloOpenEvent:readStream(streamId, connection) |
39 | if not connection:getIsServer() then |
40 | self.bunkerSilo = NetworkUtil.readNodeObject(streamId) |
41 | self.x = streamReadFloat32(streamId) |
42 | self.y = streamReadFloat32(streamId) |
43 | self.z = streamReadFloat32(streamId) |
44 | end |
45 | self:run(connection) |
46 | end |
run
DescriptionRun action on receiving sideDefinition
run(integer connection)Arguments
integer | connection | connection |
64 | function BunkerSiloOpenEvent:run(connection) |
65 | if not connection:getIsServer() then |
66 | self.bunkerSilo:openSilo(self.x, self.y, self.z) |
67 | end |
68 | end |
writeStream
DescriptionCalled on server side on joinDefinition
writeStream(integer streamId, integer connection)Arguments
integer | streamId | streamId |
integer | connection | connection |
52 | function BunkerSiloOpenEvent:writeStream(streamId, connection) |
53 | if connection:getIsServer() then |
54 | NetworkUtil.writeNodeObject(streamId, self.bunkerSilo) |
55 | streamWriteFloat32(streamId, self.x) |
56 | streamWriteFloat32(streamId, self.y) |
57 | streamWriteFloat32(streamId, self.z) |
58 | end |
59 | end |