**MAY CONTAIN TYPOS**
You could achieve this by creating your own module called camera_mod.lua with this in it:
-- camera\_mod.lua -- == -- tracking mode() - Follows target exactly. Added Pause -- == function ssk.camera.tracking\_mod( trackObj, world, params ) if( not isValid( trackObj ) ) then return end if( not isValid( world ) ) then return end params = params or {} local lockX = params.lockX local lockY = params.lockY local centered = fnn( params.centered, false) local lx = 0 local ly = 0 if( centered ) then if( lockX ) then lx = trackObj.x else lx = centerX end if( lockY ) then ly = trackObj.y else ly = centerY end else lx = params.lx or trackObj.x ly = params.ly or trackObj.y end world.enterFrame = function( event ) if( world.\_cameraPaused ) then return false end local dx = 0 local dy = 0 if(not lockX) then dx = trackObj.x - lx end if(not lockY) then dy = trackObj.y - ly end if(dx ~= 0 or dy ~= 0) then world:translate(-dx,-dy) lx = trackObj.x ly = trackObj.y end return false end listen( "enterFrame", world ) world.finalize = function( self ) ignoreList( { "enterFrame" }, self ) end; world:addEventListener( "finalize" ) function trackObj.pauseCamera( self ) if( isValid(world) ) then world.\_cameraPaused = true end end function trackObj.resumeCamera( self ) if( isValid(world) ) then world.\_cameraPaused = false end end function trackObj.stopCamera( self ) if( isValid(world) ) then ignoreList( {"enterFrame"}, world ) if( world.finalize ) then world:removeEventListener("finalize") world.finalize = nil end end end end
Then, require this after you load SSK2:
require "ssk2.loadSSK" \_G.ssk.init() require "camera\_mod"
Then change your code as follows:
function fixCamera() if( not anim.cameraAdded ) then anim.cameraAdded = true ssk.camera.tracking\_mod( anim, group, {lockY = true}) ) anim:pauseCamera() end if map.designedWidth - anim.x \< 1115 then anim:pauseCamera() elseif map.designedWidth - anim.x \> 1115 then anim:resumeCamera() end end