Hello guys, happy new year 2025! Hope everybody have a great new year better than last year.
I’m new to Defold, and still trying to get my feet wet.
I have a question, I’m trying to animate tint.w to 0 in some duration. The fading animation goes great in every duration value, except if the duration > 0.1, the callback doesn’t get executed, otherwise it gets executed. I searched this forum for similar issue and tried the solution but can’t get it work as expected.
What may I’ve done wrong? Here is my code:
function init(self)
	self.t = 3 -- <1>
end
function update(self, dt)
	self.t = self.t - dt -- <2>
	if self.t < 0 then
		go.animate("#sprite", "tint.w", go.PLAYBACK_ONCE_FORWARD, 0, go.EASING_LINEAR, 0, 0, function()
			print("deleted") 
			go.delete() 
		end)
	end
end
For additional context: the sprite is a shuriken that is thrown by character when it receive user action.
Thank you very much.
 . I change the code to the following, and it works:
. I change the code to the following, and it works: