Big List of Defold Pro Tips!

Delayed function calls on a timer. A proper way to do this is in Defold backlog. It’s been suggested until then to use go.animate. This module by @britzl is better.

local timer = require ("main.timer")

function hej()
	print("hej!")
end

function init(self)
	timer.seconds(3, hej)
end


function update(self, dt)
	timer.update(dt)
end

7 Likes