Script v1_7_1_0
- AI
- Animals
- Collections
- Contracts
- Debug
- Economy
- Elements
- EnvironmentalScore
- Errors
- Events
- AdditionalFieldBuyInfoEve...
- AIConveyorBeltSetAngleEve...
- AIFieldWorkerStateEvent
- AIJobSkipTaskEvent
- AIJobStartEvent
- AIJobStartRequestEvent
- AIJobStopEvent
- AIJobVehicleStateEvent
- AITaskStartEvent
- AITaskStopEvent
- AIVehicleIsBlockedEvent
- AnimalCleanEvent
- AnimalHusbandryNoMorePall...
- AnimalNameEvent
- AnimalRidingEvent
- AnimatedVehicleStartEvent
- AnimatedVehicleStopEvent
- BaleLoaderStateEvent
- BaleOpenEvent
- BalerAutomaticDropEvent
- BalerBaleTypeEvent
- BalerCreateBaleEvent
- BalerDropFromPlatformEven...
- BalerSetBaleTimeEvent
- BalerSetIsUnloadingBaleEv...
- BaleUnpackEvent
- BaleWrapperAutomaticDropE...
- BaleWrapperStateEvent
- BunkerSiloCloseEvent
- BunkerSiloOpenEvent
- ChainsawCutEvent
- ChainsawDelimbEvent
- ChainsawStateEvent
- CombineStrawEnableEvent
- CropSensorStateEvent
- DogFetchItemEvent
- DogFollowEvent
- DogPetEvent
- DrivableToggleLowerAllEve...
- EnvironmentalScoreEvent
- ExtendedSowingMachineRate...
- ExtendedSprayerAmountEven...
- ExtendedSprayerDefaultFru...
- FarmlandStatisticsEvent
- FarmlandStatisticsResetEv...
- FillUnitUnloadEvent
- FoldableSetFoldDirectionE...
- HonkEvent
- HPWLanceStateEvent
- InlineBaleOpenEvent
- InlineWrapperPushOffEvent
- JumpEvent
- LocomotiveStateEvent
- MixerWagonBaleNotAccepted...
- MotorGearShiftEvent
- MowerToggleWindrowDropEve...
- PickupSetStateEvent
- PlaceableFenceAddGateEven...
- PlaceableFenceAddSegmentE...
- PlaceableFenceRemoveSegme...
- PlaceableHighPressureWash...
- PlaceableLightsStateEvent
- PlaceableTrainSystemRentE...
- PlaceableTrainSystemSellE...
- PlantLimitToFieldEvent
- PlayerPermissionsEvent
- PlayerPickUpObjectEvent
- PlayerRequestStyleEvent
- PlayerSetFarmAnswerEvent
- PlayerSetFarmEvent
- PlayerSetHandToolEvent
- PlayerSetNicknameEvent
- PlayerSetStyleEvent
- PlayerSwitchedFarmEvent
- PlayerTeleportEvent
- PlayerThrowObjectEvent
- PlayerToggleLightEvent
- PlowLimitToFieldEvent
- PlowPackerStateEvent
- PlowRotationEvent
- ProductionPointOutputMode...
- ProductionPointProduction...
- ProductionPointProduction...
- PurchaseSoilMapsEvent
- ReceivingHopperSetCreateB...
- RequestEnvironmentalScore...
- RequestFarmlandStatistics...
- RequestFieldBuyInfoEvent
- ResetYieldMapEvent
- ReverseDrivingSetStateEve...
- RideableStableNotificatio...
- RidgeMarkerSetStateEvent
- SetCoverStateEvent
- SetCrabSteeringEvent
- SetCruiseControlSpeedEven...
- SetCruiseControlStateEven...
- SetDischargeStateEvent
- SetFillUnitCapacityEvent
- SetFillUnitIsFillingEvent
- SetMotorTurnedOnEvent
- SetPipeDischargeToGroundE...
- SetPipeStateEvent
- SetSeedIndexEvent
- SetTurnedOnEvent
- SetWorkModeEvent
- SoilSamplerSendEvent
- SoilSamplerStartEvent
- SprayerDoubledAmountEvent
- TensionBeltsEvent
- TensionBeltsRefreshEvent
- TrailerToggleManualDoorEv...
- TrailerToggleManualTipEve...
- TrailerToggleTipSideEvent
- TreePlanterLoadPalletEven...
- VariableWorkWidthStateEve...
- VehicleAttachEvent
- VehicleAttachRequestEvent
- VehicleBrokenEvent
- VehicleBundleAttachEvent
- VehicleDetachEvent
- VehicleEnterRequestEvent
- VehicleEnterResponseEvent
- VehicleLeaveEvent
- VehicleLowerImplementEven...
- VehiclePlayerStyleChanged...
- VehicleSetBeaconLightEven...
- VehicleSetIsReconfigurati...
- VehicleSetLightEvent
- VehicleSettingsChangeEven...
- VehicleSetTurnLightEvent
- WaterTrailerSetIsFillingE...
- WearableRepaintEvent
- WearableRepairEvent
- WoodHarvesterCutTreeEvent
- WoodHarvesterOnCutTreeEve...
- WoodHarvesterOnDelimbTree...
- 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
- Scenegraph
- Shape
- Sound
- Spline
- String
- Terrain Detail
- Text Rendering
- Tire Track
- VoiceChat
- XML
Foundation Reference
VehicleLowerImplementEvent
DescriptionEvent for lowering implementParent
EventFunctions
emptyNew
DescriptionCreate instance of Event classDefinition
emptyNew()Return Values
table | self | instance of class event |
14 | function VehicleLowerImplementEvent.emptyNew() |
15 | local self = Event.new(VehicleLowerImplementEvent_mt) |
16 | return self |
17 | end |
new
DescriptionCreate new instance of eventDefinition
new(table vehicle, integer jointIndex, boolean moveDown)Arguments
table | vehicle | vehicle |
integer | jointIndex | index of joint |
boolean | moveDown | move down |
table | instance | instance of event |
25 | function VehicleLowerImplementEvent.new(vehicle, jointIndex, moveDown) |
26 | local self = VehicleLowerImplementEvent.emptyNew() |
27 | self.jointIndex = jointIndex |
28 | self.vehicle = vehicle |
29 | self.moveDown = moveDown |
30 | return self |
31 | end |
readStream
DescriptionCalled on client side on joinDefinition
readStream(integer streamId, integer connection)Arguments
integer | streamId | streamId |
integer | connection | connection |
37 | function VehicleLowerImplementEvent:readStream(streamId, connection) |
38 | self.vehicle = NetworkUtil.readNodeObject(streamId) |
39 | self.jointIndex = streamReadInt8(streamId) |
40 | self.moveDown = streamReadBool(streamId) |
41 | self:run(connection) |
42 | end |
run
DescriptionRun action on receiving sideDefinition
run(integer connection)Arguments
integer | connection | connection |
57 | function VehicleLowerImplementEvent:run(connection) |
58 | if self.vehicle ~= nil and self.vehicle:getIsSynchronized() then |
59 | self.vehicle:setJointMoveDown(self.jointIndex, self.moveDown, true) |
60 | end |
61 | if not connection:getIsServer() then |
62 | g_server:broadcastEvent(VehicleLowerImplementEvent.new(self.vehicle, self.jointIndex, self.moveDown), nil, connection, self.vehicle) |
63 | end |
64 | 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 vehicle, integer jointIndex, boolean moveDown, boolean noEventSend)Arguments
table | vehicle | vehicle |
integer | jointIndex | index of joint |
boolean | moveDown | move down |
boolean | noEventSend | no event send |
72 | function VehicleLowerImplementEvent.sendEvent(vehicle, jointIndex, moveDown, noEventSend) |
73 | if noEventSend == nil or noEventSend == false then |
74 | if g_server ~= nil then |
75 | g_server:broadcastEvent(VehicleLowerImplementEvent.new(vehicle, jointIndex, moveDown), nil, nil, vehicle) |
76 | else |
77 | g_client:getServerConnection():sendEvent(VehicleLowerImplementEvent.new(vehicle, jointIndex, moveDown)) |
78 | end |
79 | end |
80 | end |
writeStream
DescriptionCalled on server side on joinDefinition
writeStream(integer streamId, integer connection)Arguments
integer | streamId | streamId |
integer | connection | connection |
48 | function VehicleLowerImplementEvent:writeStream(streamId, connection) |
49 | NetworkUtil.writeNodeObject(streamId, self.vehicle) |
50 | streamWriteInt8(streamId, self.jointIndex) |
51 | streamWriteBool(streamId, self.moveDown) |
52 | end |