- Joined
- Apr 27, 2015
- Messages
- 3
- Reaction score
- 0
- Primarily Uses
Hello all,
I am Trying to recreate a Scrolling camera Effect similar to legend of zelda. where the camera centres on a room in a map and when the player walks off the edge of the screen it scrolls off to the next room.
I have been using Lemony's script which seems to be the only script I can find that is similar:
[MOD]
However this script has a few problems that I can not seem to find a work around for.
Firstly rather than the camera being centred on the room it seems to be centred on the player when he enters a map. This means when I use a transfer player event the camera will be slightly off set from the room.
The second issue is with the scroll loop map effect. when the player tries to walk off the edge (and come back from the opposite side of the map) the camera starts to scroll but then never stops.
My window displays 20x15 tiles, so i have been using maps that are multiples of this and building all my rooms within that size border.
I would really appreciate it if someone could help me out by making a script that is better aligned to rooms.
Linaru Greyfall[/mod]
I am Trying to recreate a Scrolling camera Effect similar to legend of zelda. where the camera centres on a room in a map and when the player walks off the edge of the screen it scrolls off to the next room.
I have been using Lemony's script which seems to be the only script I can find that is similar:
#==============================================================================# ** Lemony's Zelda Camera (LZC), (March 2013), v.1.0#==============================================================================# This scripts allows to move the camera when the player reaches the screen# borders.#==============================================================================# (*) How to Use.-#==============================================================================# * You can actiave and deactivate the system at will by setting ON or OFF# the switch with the ID dessigned at LZC_SWITCH variable below.# The system will be ON when the switch is OFF, and OFF when the switch is ON.#------------------------------------------------------------------------------# * You can define the scroll speed for the camera movement by editing# LZC_SSPEED variable below. Default speed is 6.#==============================================================================# (**) Terms of Use.-#==============================================================================# This script is free to use in any commercial or non commercial game or# project created with any RPG Maker with a valid license as long as explicit# credits are given to the author (Lemony).#==============================================================================class Game_Player < Game_Character #-------------------------------------------------------------------------- # * Switch ID. [OPT] #-------------------------------------------------------------------------- LZC_SWITCH = 10 #-------------------------------------------------------------------------- # * Scroll Speed. [OPT] #-------------------------------------------------------------------------- LZC_SSPEED = 6 #-------------------------------------------------------------------------- # * Scroll Processing. [MOD] #-------------------------------------------------------------------------- alias lzc_update_scroll update_scroll def update_scroll(*args) if !$game_switches[LZC_SWITCH] stx, sty = $game_map.screen_tile_x, $game_map.screen_tile_y border_x = screen_x % (stx * 32) == 0 border_y = screen_y % (sty * 32) == 0 $game_map.start_scroll(6, stx, LZC_SSPEED) if border_x && @direction == 6 $game_map.start_scroll(4, stx, LZC_SSPEED) if border_x && @direction == 4 $game_map.start_scroll(2, sty, LZC_SSPEED) if border_y && @direction == 2 $game_map.start_scroll(8, sty, LZC_SSPEED) if border_y && @direction == 8 else lzc_update_scroll(args) end endend
[/MOD]
[/MOD]
However this script has a few problems that I can not seem to find a work around for.
Firstly rather than the camera being centred on the room it seems to be centred on the player when he enters a map. This means when I use a transfer player event the camera will be slightly off set from the room.
The second issue is with the scroll loop map effect. when the player tries to walk off the edge (and come back from the opposite side of the map) the camera starts to scroll but then never stops.
My window displays 20x15 tiles, so i have been using maps that are multiples of this and building all my rooms within that size border.
I would really appreciate it if someone could help me out by making a script that is better aligned to rooms.
Linaru Greyfall[/mod]
Last edited by a moderator:


