I don't understand any of this math... :(, but I wonder if it'd be possible to use an invisible sprite as an object to check for the triggering of the scrolling... Cause the scrolling I need only happens in specific places, not every screen...
If anything you could just replicate MagiCam's grid scrolling with events. You could create "rooms" using a box object or something, then check if the player's position exceeds that of the box object's boundaries (xleft, ytop, etc) and trigger the room transition then. You could also have normal scrolling if the player is inside the box, and use the boundaries to prevent the scroll position from going outside of it.
Sounds complicated but it's really just a bunch of ifs :)