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
ChainsawCutEvent
DescriptionEvent for cuttingFunctions
emptyNew
DescriptionCreate instance of Event classDefinition
emptyNew()Return Values
table | self | instance of class event |
14 | function ChainsawCutEvent:emptyNew() |
15 | local self = Event:new(ChainsawCutEvent_mt); |
16 | return self; |
17 | end; |
new
DescriptionCreate new instance of eventDefinition
new(integer splitShapeId, float x, float y, float z, float nx, float ny, float nz, float yx, float yy, float yz, float cutSizeY, float cutSizeZ)Arguments
integer | splitShapeId | id of split shape |
float | x | x |
float | y | y |
float | z | z |
float | nx | nx |
float | ny | ny |
float | nz | nz |
float | yx | yx |
float | yy | yy |
float | yz | yz |
float | cutSizeY | y cut size |
float | cutSizeZ | z cut size |
table | instance | instance of event |
34 | function ChainsawCutEvent:new(splitShapeId, x,y,z, nx,ny,nz, yx,yy,yz, cutSizeY, cutSizeZ) |
35 | local self = ChainsawCutEvent:emptyNew() |
36 | self.splitShapeId = splitShapeId; |
37 | self.x,self.y,self.z = x,y,z; |
38 | self.nx,self.ny,self.nz = nx,ny,nz; |
39 | self.yx,self.yy,self.yz = yx,yy,yz; |
40 | self.cutSizeY,self.cutSizeZ = cutSizeY,cutSizeZ; |
41 | return self; |
42 | end; |
readStream
DescriptionCalled on client side on joinDefinition
readStream(integer streamId, integer connection)Arguments
integer | streamId | streamId |
integer | connection | connection |
48 | function ChainsawCutEvent:readStream(streamId, connection) |
49 | if not connection:getIsServer() then |
50 | local splitShapeId = readSplitShapeIdFromStream(streamId); |
51 | local x = streamReadFloat32(streamId); |
52 | local y = streamReadFloat32(streamId); |
53 | local z = streamReadFloat32(streamId); |
54 | local nx = streamReadFloat32(streamId); |
55 | local ny = streamReadFloat32(streamId); |
56 | local nz = streamReadFloat32(streamId); |
57 | local yx = streamReadFloat32(streamId); |
58 | local yy = streamReadFloat32(streamId); |
59 | local yz = streamReadFloat32(streamId); |
60 | local cutSizeY = streamReadFloat32(streamId); |
61 | local cutSizeZ = streamReadFloat32(streamId); |
62 | if splitShapeId ~= 0 then |
63 | ChainsawUtil.cutSplitShape(splitShapeId, x,y,z, nx,ny,nz, yx,yy,yz, cutSizeY, cutSizeZ); |
64 | end |
65 | end |
66 | end; |
writeStream
DescriptionCalled on server side on joinDefinition
writeStream(integer streamId, integer connection)Arguments
integer | streamId | streamId |
integer | connection | connection |
72 | function ChainsawCutEvent:writeStream(streamId, connection) |
73 | if connection:getIsServer() then |
74 | writeSplitShapeIdToStream(streamId, self.splitShapeId); |
75 | streamWriteFloat32(streamId, self.x); |
76 | streamWriteFloat32(streamId, self.y); |
77 | streamWriteFloat32(streamId, self.z); |
78 | streamWriteFloat32(streamId, self.nx); |
79 | streamWriteFloat32(streamId, self.ny); |
80 | streamWriteFloat32(streamId, self.nz); |
81 | streamWriteFloat32(streamId, self.yx); |
82 | streamWriteFloat32(streamId, self.yy); |
83 | streamWriteFloat32(streamId, self.yz); |
84 | streamWriteFloat32(streamId, self.cutSizeY); |
85 | streamWriteFloat32(streamId, self.cutSizeZ); |
86 | end |
87 | end; |
run
DescriptionRun action on receiving sideDefinition
run(integer connection)Arguments
integer | connection | connection |
92 | function ChainsawCutEvent:run(connection) |
93 | print("Error: ChainsawCutEvent is not allowed to be executed on a local client"); |
94 | end; |