I am using the SSK2 camera and I have come across a problem. I created a function to stop the camera when it approached the end of my scene so the black area does not appear. But I keep getting this error when stopping the camera:
ERROR: Runtime error ERROR: nil key supplied for property lookup. stack traceback: [C]: ? ?: in function 'removeEventListener' ?: in function 'removeEventListener' ?: in function 'removeEventListener' ssk2/easyCamera.lua:138: in function 'stopCamera' main.lua:143: in function '?' ?: in function \<?:190\>
I believe it has something to do with my group, as the line in the easyCamera.lua that is referred to in the stack traceback removes the event listener from the group. This is the function I created:
function fixCamera() if map.designedWidth - anim.x \< 1115 then anim.isCameraActive = false anim:stopCamera() --Line 143 (Error Line) elseif map.designedWidth - anim.x \> 1115 and anim.isCameraActive == false then ssk.camera.tracking(anim, group, {lockY = true}) end end
If any more code is needed please ask.
Thank you!
PS, @roaminggamer, Thanks for the awesome camera system!
Works straight out of the box for me.