Doing camera zones was always just a feature which took a small number of lines to do. It's rather simple, but why not make it more simple?
Sadly, I'm unable to make it as simple as "select areas in the editor" yet, but one line of lua per zone should do for now.
This script works in levels and on the world map. You can use it on the map to have arbitrarily sized boundaries for individual worlds.
Here's how you use it:
Put the file into your level or episode folder and then type the following into your lunadll.lua or lunaoverworld.lua file:
Code: Select all
local camLock = API.load("camLock")
camLock.addZone(x,y,width,height,speed)
y: The y-coordinate of the top left corner of the zone.
width: how wide your zone should be
height: how tall your zone should be
speed: how quickly the camera should snap into the zone. 0 means it won't react to the zone, while 1 means that it will snap instantly. Any value in between is a gradual move towards the zone. Default is 0.05.
Bear in mind that this library doesn't care about section boundaries, so if you don't want the camera to go below a section, be careful with your zones.

Have fun!