For a more up-to-date module, consider downloading Rellax:The Smooth Scrolling & Parallax module is available here:
Version 1.7.1Download:
Smooth Scrolling & Parallax Module(Please reply or PM me if you can host a mirror)
Module History:v1.7.1 Fixed bug that disabled parallax when smooth scrolling
was off.
v1.7 - Added targetCharacter pointer to make camera animation possible without switching player characters. Enabled Smooth Scrolling and Parallax on Linux.
v1.6 - Added LucasArts style scrolling triggered by proximity to the edge of the screen.
v1.5 - Fixed a major problem with objects not returning to the correct position when leaving and re-entering a room.
v1.4 - Cleaned up script and improved suspension of scrolling effect.
Added this module history!
v1.3 - Added option to switch smooth scrolling off and on.
v1.2 - A wider range of parallax speeds.
Less jerky stopping.
Pixel perfect object movement at slow speeds (not for animated objects, requires a bit of work).
Up to 25 parallax objects.
Smooth sun/moon parallax.
LENS FLARE EFFECT!
v1.1 - Formatted module according to AGS programming conventions.
Notes:For better lens flares talk to
Mr Ryan Timothy...Known Issues:
If your character changes view from a tall to a short sprite, the module screen will snap into a new position. This is because it's aiming for the 'head' of the sprite. To get around this, switch targetCharacter to a dummy character (at the same co-ordinates) while you make the transition.
If you're playing as a different character to the player character at game start, and the module has been off, then when you switch it on you the camera will pan from the old character it was following to the current character*. To get around this, set the targetCharacter to the player before calling ChangeRoom, so the camera starts out looking in the right place.
Similarly, if you change a player's X and Y position in room_load, the module will pan from where they used to be to where they are now. If you can, include the desired co-ordinates in the ChangeRoom function. If not, try using a Dummy character who's already in the right place.
*This would be desirable behaviour if you were using it to pan between characters in a cutscene, etc.