Rpg zelda construct
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.

Rpg zelda construct

tout pour rpg maker et +
 
AccueilPortailRechercherDernières imagesS'enregistrerConnexion
Le deal à ne pas rater :
Cartes Pokémon : la prochaine extension Pokémon sera EV6.5 Fable ...
Voir le deal

 

 defilement des map a la zelda

Aller en bas 
2 participants
AuteurMessage
Link
Roi
Roi
Link


Nombre de messages : 401
Date d'inscription : 25/01/2006

defilement des map a la zelda Empty
MessageSujet: defilement des map a la zelda   defilement des map a la zelda EmptySam 4 Fév à 13:23

nstallation : Copiez le code, ouvrez l'éditeur de script ( F11 ) et créez en un nouveau au dessus de 'Main'.
Nommez ce script " Game_Map " et collez le code.

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
Revenir en haut Aller en bas
http://rpg-make-xp-total.forumpro.fr
Da Maschÿne
Page
Da Maschÿne


Nombre de messages : 5
Date d'inscription : 03/02/2006

defilement des map a la zelda Empty
MessageSujet: Re: defilement des map a la zelda   defilement des map a la zelda EmptyJeu 16 Fév à 2:43

c'est bien beau mais le probleme c'est que quannd tu aboutis a un endroit de la map et que tu met ton menu, après quand tu désacives ton menu et que tu reviens au jeu hé ben l'écran s'est recadré sur le héros ce qui fiche tout en l'air !
Revenir en haut Aller en bas
 
defilement des map a la zelda
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» ressource zelda
» Script: coeur a la zelda
» The Legend of Zelda Ocarina of Time

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
Rpg zelda construct :: Rpg Maker :: Script et Tuto XP-
Sauter vers:  
Ne ratez plus aucun deal !
Abonnez-vous pour recevoir par notification une sélection des meilleurs deals chaque jour.
IgnorerAutoriser