Page 1 of 1

Scrolling works incorrect

Posted: Mon Jun 08, 2020 9:56 am
by DrMekar
So I decided to add a Boss to World 2 of MH1.5 using Scrolling, though
somehow it doesn't work right.

This is how the Code looks. Should be fine..

Code: Select all

local autoscroll = require("autoscroll") 
function onEvent(p) 
    if p == "Boss Fight" then 
        autoscroll.scrollLeft(0.7, (0.2))
    end
    if p == "Boss Start" then
        Audio.MusicChange(3, ("(MUSIC)/Boss - Locust.mp3"))
    end
end
..though it does that:
Image

I really have no idea why it scrolls to the right, since the Events do Nothing, but activating the Lua Code with
a 1 Second Delay.

Re: Scrolling works incorrect

Posted: Mon Jun 08, 2020 10:05 am
by Emral
What is the (0.2) for?

Re: Scrolling works incorrect

Posted: Mon Jun 08, 2020 10:10 am
by DrMekar
Enjl wrote:
Mon Jun 08, 2020 10:05 am
What is the (0.2) for?
That's a good Question. I remember that it was necessary to make the Gore Battle work.
One moment.

Added in 2 minutes 47 seconds:
Nevermind. It works correct now.

Re: Scrolling works incorrect

Posted: Mon Jun 08, 2020 10:14 am
by Emral
Okay. Just for reference, the arguments for the scroll functions are: speed, boundary, section. Boundary in this case is the left edge where the scrolling ends. I can imagine that 0.2 breaking things because x=0.2 was the ending coordinate of the scroll. boundary and section are both optional and default to the default end of the section in the scrolling direction.

Re: Scrolling works incorrect

Posted: Mon Jun 08, 2020 10:50 am
by DrMekar
Enjl wrote:
Mon Jun 08, 2020 10:14 am
Okay. Just for reference, the arguments for the scroll functions are: speed, boundary, section. Boundary in this case is the left edge where the scrolling ends. I can imagine that 0.2 breaking things because x=0.2 was the ending coordinate of the scroll. boundary and section are both optional and default to the default end of the section in the scrolling direction.
Okay, Thanks. I also know again for what I used it. It was used to slow the Scrolling down near the End.