LUADOC - Farming Simulator 17

Printable Version

AIVehicleRotateLeftEvent

Description
Event for ai rotate left
Functions

emptyNew

Description
Create instance of Event class
Definition
emptyNew()
Return Values
tableselfinstance of class event
Code
15function AIVehicleRotateLeftEvent:emptyNew()
16 local self = Event:new(AIVehicleRotateLeftEvent_mt);
17 return self;
18end;

new

Description
Create new instance of event
Definition
new(table object)
Arguments
tableobjectobject
Code
23function AIVehicleRotateLeftEvent:new(object)
24 local self = AIVehicleRotateLeftEvent:emptyNew()
25 self.object = object;
26 return self;
27end;

readStream

Description
Called on client side on join
Definition
readStream(integer streamId, integer connection)
Arguments
integerstreamIdstreamId
integerconnectionconnection
Code
33function AIVehicleRotateLeftEvent:readStream(streamId, connection)
34 self.object = readNetworkNodeObject(streamId);
35 self:run(connection);
36end;

writeStream

Description
Called on server side on join
Definition
writeStream(integer streamId, integer connection)
Arguments
integerstreamIdstreamId
integerconnectionconnection
Code
42function AIVehicleRotateLeftEvent:writeStream(streamId, connection)
43 writeNetworkNodeObject(streamId, self.object);
44end;

run

Description
Run action on receiving side
Definition
run(integer connection)
Arguments
integerconnectionconnection
Code
49function AIVehicleRotateLeftEvent:run(connection)
50 AIVehicle.aiRotateLeft(self.object);
51end;