LUADOC - Farming Simulator 19

Script v1.7.1.0

Engine v1.7.1.0

Foundation Reference

PlayerStateDrop

Parent
PlayerStateBase
Functions

activate

Description
Activate method.
Definition
activate()
Code
37function PlayerStateDrop:activate()
38 PlayerStateDrop:superClass().activate(self)
39
40 self.player:pickUpObject(false)
41 self:deactivate()
42end

isAvailable

Description
Definition
isAvailable()
Return Values
booltrueif player can idle
Code
28function PlayerStateDrop:isAvailable()
29 if self.player.isCarryingObject then
30 return true
31 end
32 return false
33end

new

Description
Creating instance of state.
Definition
new(table player, table stateMachine)
Arguments
tableplayerinstance of player
tablestateMachineinstance of the state machine manager
Return Values
tableinstanceinstance of object
Code
19function PlayerStateDrop:new(player, stateMachine)
20 local self = PlayerStateBase:new(player, stateMachine, PlayerStateDrop_mt)
21
22 return self
23end