Looks nice!
OK, I had a look and fixed some things.
Firstly, that pause when you use a door is due to "autosave", which actually brings up the save menu if the game hasn't been saved yet, which you can't see because the screen is faded out. Several different solutions. One is to get the player to pick a save slot when they start the game.
player can left/right (obviously) were broken. I see that the version I posted of the script wasn't suitable for how you wanted to use it. So I pretty much rewrote them. The xv global is needed to communicate where the player is going to be. I did test running. The biggest problem with it is that is makes the camera position lag worse. So I fixed that as well by not using "set slice velocity x", which was a one line fix (see below).
Code: script, horizontal movement, begin
if(read pass block(x/20,y/20 +1),and, northwall) then(
replace walkabout sprite(player,0)
#set slice velocity x(player,xv,1)
climbing := false
vertical align
)
end
script, try left, begin
if(want run) then(
xv := -10
) else (
xv := -5
)
if(player can left) then(
horizontal movement
) else (
# Prevents running animation
xv := 0
)
end
script, try right, begin
if(want run) then(
xv := 10
) else (
xv := 5
)
if(player can right) then(
horizontal movement
) else (
xv := 0
)
end
script, player can left, begin
variable(new tile x)
new tile x := (slice x (player) + xv) / 20
# Nothing to do if not crossing a tile boundary
# (This check is currently unneeded, but it's better to be robust)
if (new tile x == slice x (player) / 20)
then (return(true))
if( read pass block(new tile x, y / 20), and, eastwall
|| read pass block(new tile x + 1, y / 20), and, westwall # Tile the player is currently on
|| new tile x < 0
) then(
put sprite(player, (new tile x + 1) * 20, slice y(player))
return(false)
) else (
return(true)
)
end
script, player can right, begin
variable(new tile x)
new tile x := (slice x (player) + 19 + xv) / 20
# Nothing to do if not crossing a tile boundary
# (This check is currently unneeded, but it's better to be robust)
if (new tile x == (slice x (player) + 19) / 20)
then (return(true))
if( read pass block(new tile x, y / 20), and, westwall
|| read pass block(new tile x -- 1, y / 20), and, eastwall # Tile the player is currently on
|| new tile x >= map width
) then(
put sprite(player, (new tile x -- 1) * 20, slice y(player))
return(false)
) else (
return(true)
)
end
Then in front of the block in the main loop that sets the camera position, add
Code: put slice(player, slice x(player) + xv, slice y(player))
Note that I commented out the "set slice velocity x" line.
Might have a look at the ladder problems tomorrow.