// Error
ERROR:GAMESYS: Failed to setup state changed callback (has the calling script been destroyed?)
Has anyone dealt with such an error? This starts happening with the very first instance.
Code that executes on an collision
function on_message(self, message_id, message, sender)
if message_id == hash("trigger_response") and message.enter then
-- Hide the missle, disable collision, stop movement
-- Explode animation
msg.post("#is_trigger", "disable")
msg.post("#sprite", "disable")
-- No more moving
self.move.x = 0
go.delete() -- Same result with and without this line
-- Particle effect: Dirt explosion
particlefx.play("#dirt_particles",
function(self, id, emitter, state)
if state == particlefx.EMITTER_STATE_SLEEPING then
go.delete(".", true)
end
end)
sound.play("main:/sfx_group#snowball")
end
end