KoolGamer32 wrote: ↑Thu Aug 05, 2021 10:41 am
thanks for the help on that area but I am still a bit confused. I also need help with how to even load it if i need a script or what. I would also like to know how to trigger camera control at specific points in the level similar to an event triggered by a trigger
You need to load handycam with the line:
Code: Select all
local handycam = require("handycam")
From there, you can then use the onEvent function to use SMBX events to trigger zooming in and out:
Code: Select all
function onEvent(name)
if name == "Zoom In" then
handycam[1].zoom = 2
elseif name == "Zoom Out" then
handycam[1].zoom = 1
end
end
If you want to get
really fancy, you can, instead of just setting the zoom level, use the queue function, like so:
Code: Select all
handycam[1]:queue{ zoom = 2, time = 1 }
To allow for some transitioning. Note the use of a colon instead of a dot, and the use of curly braces instead of brackets.