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
BaleOpenEvent
DescriptionEvent for bale openingParent
EventFunctions
emptyNew
DescriptionCreate instance of Event classDefinition
emptyNew()Return Values
table | self | instance of class event |
13 | function BaleOpenEvent.emptyNew() |
14 | local self = Event.new(BaleOpenEvent_mt) |
15 | return self |
16 | end |
new
DescriptionCreate new instance of eventDefinition
new(table bale, float x, float y, float z)Arguments
table | bale | bale |
float | x | x opening position |
float | y | y opening position |
float | z | z opening position |
table | instance | instance of event |
25 | function BaleOpenEvent.new(bale) |
26 | local self = BaleOpenEvent.emptyNew() |
27 | self.bale = bale |
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 BaleOpenEvent:readStream(streamId, connection) |
36 | if not connection:getIsServer() then |
37 | self.bale = NetworkUtil.readNodeObject(streamId) |
38 | end |
39 | |
40 | self:run(connection) |
41 | end |
run
DescriptionRun action on receiving sideDefinition
run(integer connection)Arguments
integer | connection | connection |
56 | function BaleOpenEvent:run(connection) |
57 | if not connection:getIsServer() then |
58 | self.bale:open() |
59 | end |
60 | end |
writeStream
DescriptionCalled on server side on joinDefinition
writeStream(integer streamId, integer connection)Arguments
integer | streamId | streamId |
integer | connection | connection |
47 | function BaleOpenEvent:writeStream(streamId, connection) |
48 | if connection:getIsServer() then |
49 | NetworkUtil.writeNodeObject(streamId, self.bale) |
50 | end |
51 | end |