Skip to main content
Skip to main content

SmartAttachActivatable

SmartAttachActivatable

Description

This is the activable class for smartAttach

Functions

getIsActivatable

Description

Returns if is activateable

Definition

getIsActivatable()

Return Values

anyisActivateableis activateable

Code

function SmartAttachActivatable:getIsActivatable()
return self.smartAttachVehicle:getCanBeSmartAttached()
end

new

Description

Returns new instance of class

Definition

new(table smartAttachVehicle)

Arguments

tablesmartAttachVehicleobject of smartAttachVehicle

Return Values

tableselfnew instance

Code

function SmartAttachActivatable.new(smartAttachVehicle)
local self = setmetatable( { } , SmartAttachActivatable _mt)

self.smartAttachVehicle = smartAttachVehicle
self.activateText = ""

return self
end

run

Description

Called on activate object

Definition

run()

Code

function SmartAttachActivatable:run()
local vehicle = self.smartAttachVehicle
local spec = vehicle.spec_smartAttach
vehicle:doSmartAttach(spec.targetVehicle, spec.inputJointDescIndex, spec.jointDescIndex)
end