Deprecated: str_replace(): Passing null to parameter #1 ($search) of type array|string is deprecated in /var/www/vhosts/gamedevstudiogame.com/httpdocs/classes/client.php on line 124

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /var/www/vhosts/gamedevstudiogame.com/httpdocs/classes/client.php on line 124
Game dev studio

Classes

Concepts

Libraries

Objects

contractor »

conversationAnswerData »

engineStatData »

issueData »

playerPlatformSpecialistData »

projectReviewConclusion »

projectReviewRemark »

randomEventData »

statusIcon »

begin

Description

Called when this action is begun.

Arguments

1 developer employee

the employee that is now performing this action.

Example

-- taken from game/developer/actions.lua


function useWaterDispenser:begin(target)
	local randomIndex = math.random(1, #self.validObjects)
	local randomObject = self.validObjects[randomIndex]
	
	self.employee = target
	self.employeeAvatar = target:getAvatar()
	self.targetObject = randomObject
	randomObject:setInteractionTarget(target)
	
	table.clearArray(self.validObjects)
end