LUADOC - Farming Simulator 17

Printable Version

AIVehicleRotateRightEvent

Description
Event for ai rotate right
Functions

emptyNew

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

new

Description
Create new instance of event
Definition
new(table object)
Arguments
tableobjectobject
Code
23function AIVehicleRotateRightEvent:new(object)
24 local self = AIVehicleRotateRightEvent: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 AIVehicleRotateRightEvent: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 AIVehicleRotateRightEvent:writeStream(streamId, connection)
43 writeNetworkNodeObject(streamId, self.object);
44end;

run

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