Script v1.4.4.0
- Handtools
- Events
- AIVehicleRotateLeftEvent
- AIVehicleRotateRightEvent
- AIVehicleSetConveyorBeltA...
- AIVehicleSetStartedEvent
- AnimatedVehicleStartEvent
- AnimatedVehicleStopEvent
- BaleLoaderStateEvent
- BalerCreateBaleEvent
- BalerSetBaleTimeEvent
- BalerSetIsUnloadingBaleEv...
- BaleWrapperStateEvent
- BunkerSiloCloseEvent
- BunkerSiloOpenEvent
- ChainsawCutEvent
- ChainsawDelimbEvent
- ChainsawStateEvent
- CombineStrawEnableEvent
- DrivableToggleLowerAllEve...
- FoldableSetFoldDirectionE...
- GreenhouseSetIsWaterTankF...
- HonkEvent
- HPWPlaceableStateEvent
- HPWPlaceableTurnOnEvent
- MixerWagonBaleNotAccepted...
- MowerToggleWindrowDropEve...
- OverloadingToggleUnloadEv...
- PickupSetStateEvent
- PlantLimitToFieldEvent
- PloughLimitToFieldEvent
- PloughRotationEvent
- ReceivingHopperSetCreateB...
- ReverseDrivingSetStateEve...
- RidgeMarkerSetStateEvent
- SetCoverStateEvent
- SetCrabSteeringEvent
- SetCruiseControlSpeedEven...
- SetCruiseControlStateEven...
- SetDischargeToGroundEvent
- SetIsFillingEvent
- SetMotorTurnedOnEvent
- SetPipeStateEvent
- SetTurnedOnEvent
- SowingMachineSetSeedIndex
- SteerableToggleRefuelEven...
- StrawBlowerDoorOpenEvent
- TensionBeltsEvent
- TensionBeltsRefreshEvent
- TrailerToggleTipEvent
- TreePlanterLoadPalletEven...
- VehicleAttachEvent
- VehicleBundleAttachEvent
- VehicleDetachEvent
- VehicleEnterRequestEvent
- VehicleEnterResponseEvent
- VehicleLeaveEvent
- VehicleLowerImplementEven...
- VehicleSetBeaconLightEven...
- VehicleSetLightEvent
- VehicleSetTurnLightEvent
- WaterTrailerSetIsFillingE...
- WoodHarvesterCutTreeEvent
- WoodHarvesterOnCutTreeEve...
- WoodHarvesterOnDelimbTree...
- Objects
- Placeables
- Triggers
- Utils
- Vehicles
- Specializations
Engine v7.0.0.2
- General
- Entity
- Node
- Scenegraph
- Lighting
- Camera
- Shape
- Particle System
- Physics
- Spline
- Animation
- Overlays
- Sound
- Input
- XML
- Network
- Callbacks
- Text Rendering
- Terrain Detail
- Tire Track
- Editor
- Rendering
- String
- Math
- I3D
- Fillplanes
Foundation Reference
SowingMachineSetSeedIndex
DescriptionSet seed index eventFunctions
emptyNew
DescriptionCreate instance of Event classDefinition
emptyNew()Return Values
table | self | instance of class event |
15 | function SowingMachineSetSeedIndex:emptyNew() |
16 | local self = Event:new(SowingMachineSetSeedIndex_mt); |
17 | return self; |
18 | end; |
new
DescriptionCreate new instance of eventDefinition
new(table object, integer seedIndex)Arguments
table | object | object |
integer | seedIndex | index of seed |
24 | function SowingMachineSetSeedIndex:new(object, seedIndex) |
25 | local self = SowingMachineSetSeedIndex:emptyNew() |
26 | self.object = object; |
27 | self.seedIndex = seedIndex; |
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 SowingMachineSetSeedIndex:readStream(streamId, connection) |
36 | self.object = readNetworkNodeObject(streamId); |
37 | self.seedIndex = streamReadUInt8(streamId); |
38 | self:run(connection); |
39 | end; |
writeStream
DescriptionCalled on server side on joinDefinition
writeStream(integer streamId, integer connection)Arguments
integer | streamId | streamId |
integer | connection | connection |
45 | function SowingMachineSetSeedIndex:writeStream(streamId, connection) |
46 | writeNetworkNodeObject(streamId, self.object); |
47 | streamWriteUInt8(streamId, self.seedIndex); |
48 | end; |
run
DescriptionRun action on receiving sideDefinition
run(integer connection)Arguments
integer | connection | connection |
53 | function SowingMachineSetSeedIndex:run(connection) |
54 | if not connection:getIsServer() then |
55 | g_server:broadcastEvent(self, false, connection, self.object); |
56 | end; |
57 | self.object:setSeedIndex(self.seedIndex, true); |
58 | 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, integer seedIndex, boolean noEventSend)Arguments
table | object | object |
integer | seedIndex | index of seed |
boolean | noEventSend | no event send |
65 | function SowingMachineSetSeedIndex.sendEvent(object, seedIndex, noEventSend) |
66 | if noEventSend == nil or noEventSend == false then |
67 | if g_server ~= nil then |
68 | g_server:broadcastEvent(SowingMachineSetSeedIndex:new(object, seedIndex), nil, nil, object); |
69 | else |
70 | g_client:getServerConnection():sendEvent(SowingMachineSetSeedIndex:new(object, seedIndex)); |
71 | end; |
72 | end; |
73 | end; |