Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Zelda-like Map Transition

Ok, everyone that played Snes and GBA Zelda games (i think that its more than 80% of the forum members) know what im talking about.
It's hard to tell exactly how it happens, you must play the game to know.
But i want a map transition system like in those games. Once i found one in the net, but it was very bugged (im not gonna post it here because there is no credits in the site i took it).
Any question, just ask it here. And if someone can explain that system with words, will be great too.

Thanks!
 
Reaper*;106845 said:
Post in the lost script if this script was on .net or exist and search in the submitted script section there's surely one like you asked

Here it is:
Autor: Inconnu
Code:
class Game_Map
#--------------------------------------------------------------------------
# * Scroll Down
# distance : scroll distance
#--------------------------------------------------------------------------
def scroll_down(distance)
@display_y = @display_y + distance
end
#--------------------------------------------------------------------------
# * Scroll Left
# distance : scroll distance
#--------------------------------------------------------------------------
def scroll_left(distance)
@display_x = @display_x - distance
end
#--------------------------------------------------------------------------
# * Scroll Right
# distance : scroll distance
#--------------------------------------------------------------------------
def scroll_right(distance)
@display_x = @display_x + distance
end
#--------------------------------------------------------------------------
# * Scroll Up
# distance : scroll distance
#--------------------------------------------------------------------------
def scroll_up(distance)
@display_y = @display_y - distance
end
end

class Game_Player
def update
# Remember whether or not moving in local variables
last_moving = moving?
# If moving, event running, move route forcing, and message window
# display are all not occurring
unless moving? or $game_system.map_interpreter.running? or
@move_route_forcing or $game_temp.message_window_showing
# Move player in the direction the directional button is being pressed
case Input.dir4
when 2
move_down
when 4
move_left
when 6
move_right
when 8
move_up
end
end
# Remember coordinates in local variables
last_real_x = @real_x
last_real_y = @real_y
super
# If character moves down and is positioned lower than the center
# of the screen
if @y % 15 == 0 and @real_y > last_real_y
# Scroll map down
$game_map.scroll_down(16 * 15)
end
# If character moves left and is positioned more let on-screen than
# center
if @x % 20 == 19 and last_real_x > @real_x
# Scroll map left
$game_map.scroll_left(16 * 20)
end
# If character moves right and is positioned more right on-screen than
# center
if @x % 20 == 0 and @real_x > last_real_x
# Scroll map right
$game_map.scroll_right(16 * 20)
end
# If character moves up and is positioned higher than the center
# of the screen
if @y % 15 == 14 and last_real_y > @real_y
# Scroll map up
$game_map.scroll_up(16 * 15)
end
# If not moving
unless moving?
# If player was moving last time
if last_moving
# Event determinant is via touch of same position event
result = check_event_trigger_here([1,2])
# If event which started does not exist
if result == false
# Disregard if debug mode is ON and ctrl key was pressed
unless $DEBUG and Input.press?(Input::CTRL)
# Encounter countdown
if @encounter_count > 0
@encounter_count -= 1
end
end
end
end
# If C button was pressed
if Input.trigger?(Input::C)
# Same position and front event determinant
check_event_trigger_here([0])
check_event_trigger_there([0,1,2])
end
end
end
end
gorechild;106888 said:
You just would need to find a transition that makes it look like the screen just slides into it dont you?

Gorechild Yes, i searched but i dont got any results.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top