I'm pretty new to writing lua scripts for my SMBX2 episode, so basically what I want to do is have autoscroll activate when I enter area 4 of my level. I have the following code in my local script:
local autoscroll = require("autoscroll")
function onEvent(scroll)
autoscroll.scrollRight(1, nil, 4)
end
There is an event trigger overlayed with the warp exit at the start of area 4 that is supposed to call the "scroll" event and run that code when Mario enters the room, but when testing the level, the autoscroll had already run and the camera was stopped at the far-right side of the room, so I'm guessing that means the code just ran at the start of the level. I'm clearly missing something here. Can anyone help me out?
local autoscroll = require("autoscroll")
function onEvent(scroll)
autoscroll.scrollRight(1, nil, 4)
end
There is an event trigger overlayed with the warp exit at the start of area 4 that is supposed to call the "scroll" event and run that code when Mario enters the room, but when testing the level, the autoscroll had already run and the camera was stopped at the far-right side of the room, so I'm guessing that means the code just ran at the start of the level. I'm clearly missing something here. Can anyone help me out?
Statistics: Posted by SuperStache — Mon Jul 29, 2024 9:58 pm