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
SoilSamplerStartEvent
DescriptionEvent for starting soil sample processParent
EventFunctions
emptyNew
DescriptionCreate instance of Event classDefinition
emptyNew()Return Values
table | self | instance of class event |
13 | function SoilSamplerStartEvent:emptyNew() |
14 | local self = Event.new(SoilSamplerStartEvent_mt) |
15 | return self |
16 | end |
new
DescriptionCreate new instance of eventDefinition
new(table object)Arguments
table | object | object |
21 | function SoilSamplerStartEvent.new(object) |
22 | local self = SoilSamplerStartEvent:emptyNew() |
23 | self.object = object |
24 | return self |
25 | end |
readStream
DescriptionCalled on client side on joinDefinition
readStream(integer streamId, integer connection)Arguments
integer | streamId | streamId |
integer | connection | connection |
31 | function SoilSamplerStartEvent:readStream(streamId, connection) |
32 | self.object = NetworkUtil.readNodeObject(streamId) |
33 | self:run(connection) |
34 | end |
run
DescriptionRun action on receiving sideDefinition
run(integer connection)Arguments
integer | connection | connection |
47 | function SoilSamplerStartEvent:run(connection) |
48 | if not connection:getIsServer() then |
49 | g_server:broadcastEvent(self, false, connection, self.object) |
50 | end |
51 | |
52 | if self.object ~= nil and self.object:getIsSynchronized() then |
53 | self.object:startSoilSampling(true) |
54 | end |
55 | end |
sendEvent
DescriptionBroadcast event from server to all clients, if called on client call function on server and broadcast it to all clientsDefinition
sendEvent(table object, boolean noEventSend)Arguments
table | object | object |
boolean | noEventSend | no event send |
61 | function SoilSamplerStartEvent.sendEvent(object, noEventSend) |
62 | if noEventSend == nil or noEventSend == false then |
63 | if g_server ~= nil then |
64 | g_server:broadcastEvent(SoilSamplerStartEvent.new(object), nil, nil, object) |
65 | else |
66 | g_client:getServerConnection():sendEvent(SoilSamplerStartEvent.new(object)) |
67 | end |
68 | end |
69 | end |
writeStream
DescriptionCalled on server side on joinDefinition
writeStream(integer streamId, integer connection)Arguments
integer | streamId | streamId |
integer | connection | connection |
40 | function SoilSamplerStartEvent:writeStream(streamId, connection) |
41 | NetworkUtil.writeNodeObject(streamId, self.object) |
42 | end |