Searching the forum I found this very interesting function. (Here's a link (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=16497.0) to the post).
Basically it scrolls the screen using an invisible character (DUMMY here)
function MoveViewportBlocking(int x, int y, int speed, int antiglide) {
int dummy = DUMMY;
int pc = GetPlayerCharacter();
character[dummy].room = character[pc].room;
character[dummy].x = GetViewportX() + system.viewport_width/2;
character[dummy].y = GetViewportY() + system.viewport_height/2;
SetPlayerCharacter(dummy);
SetCharacterSpeed(dummy, speed);
antiglide = SetGameOption(OPT_ANTIGLIDE, !!antiglide);
MoveCharacterDirect(dummy, x+system.viewport_width/2, y+system.viewport_height/2);
while (character[dummy].walking) Wait(40);
SetPlayerCharacter(pc);
SetViewport(GetViewportX(), GetViewportY());
SetGameOption (OPT_ANTIGLIDE, antiglide);
}
I set the parameter "speed" to the minimum but I feel it is still too fast and I don't know if there's a way to slow down the scroll.
Any help?
Have you tried using numbers under 0 like -4 for speed.
I think it should be slower then.
:= It rocks
I've updated the code to current script:
function MoveViewportBlocking(int x, int y, int speed, int antiglide) {
cDummy.ChangeRoom(player.Room, GetViewportX()+System.ViewportWidth/2, GetViewportY()+System.ViewportHeight/2);
Character*pc=player;
cDummy.SetAsPlayer();
cDummy.SetWalkSpeed(speed, speed);
antiglide = SetGameOption(OPT_ANTIGLIDE, !!antiglide);
cDummy.Walk(x+system.viewport_width/2, y+system.viewport_height/2, eAnywhere, eBlock);
pc.SetAsPlayer();
SetViewport(GetViewportX(), GetViewportY());
SetGameOption (OPT_ANTIGLIDE, antiglide);
}