Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Limited Moves v. 1.1
- # VX Ace version
- # by mikb89
- # Dettagli:
- # Questo script permette di limitare i movimenti del giocatore.
- # Via chiama script si possono inserire le istruzioni su quale direzione
- # bloccare o sbloccare.
- # lock_move_right bloccherà i movimenti a destra.
- # unlock_move_down sbloccherà quelli in giù.
- # Metto giusto questi a titolo di esempio, per operare con sinistra e su
- # chiaramente basta sostituire right o down con left per sinistra e up per su.
- # In ogni caso attivando l'opzione sottostante si possono avere i comandi in
- # italiano, molto più comodi, probabilmente ^^
- # Configurazioni:
- module LIMOV
- COMANDI_ITA = true
- # Permette di avere i comandi in italiano come blocca_dx o sblocca_giu
- end
- #Codename: limov
- ($imported ||= {})[:mikb89_limov] = true
- # License:
- # - You can ask me to include support for other scripts as long as these scripts
- # use the $imported[script] = true;
- # - You can modify and even repost my scripts, after having received a response
- # by me. For reposting it, anyway, you must have done heavy edit or porting,
- # you can't do a post with the script as is;
- # - You can use my scripts for whatever you want, from free to open to
- # commercial games. I'd appreciate by the way if you let me know about what
- # you're doing;
- # - You must credit me, if you use this script or part of it.
- class Game_Player < Game_Character
- attr_accessor :limovs
- alias_method(:init_b4_limov, :initialize) unless method_defined?(:init_b4_limov)
- def initialize
- init_b4_limov
- @limovs = []
- end
- alias_method(:mv_strait_b4_limov, :move_straight) unless method_defined?(:mv_strait_b4_limov)
- def move_straight(d, turn_ok = true)
- return if @limovs.include?(d)
- mv_strait_b4_limov(d, turn_ok)
- end
- end
- class Game_Interpreter
- def lock_move(m)
- $game_player.limovs << m
- $game_player.limovs.uniq!
- end
- def unlock_move(m)
- $game_player.limovs.delete(m)
- $game_player.limovs.uniq!
- end
- def lock_move_right
- lock_move(6)
- end
- def lock_move_left
- lock_move(4)
- end
- def lock_move_up
- lock_move(8)
- end
- def lock_move_down
- lock_move(2)
- end
- def unlock_move_right
- unlock_move(6)
- end
- def unlock_move_left
- unlock_move(4)
- end
- def unlock_move_up
- unlock_move(8)
- end
- def unlock_move_down
- unlock_move(2)
- end
- if LIMOV::COMANDI_ITA
- def blocca_dx
- lock_move(6)
- end
- def blocca_sx
- lock_move(4)
- end
- def blocca_su
- lock_move(8)
- end
- def blocca_giu
- lock_move(2)
- end
- def sblocca_dx
- unlock_move(6)
- end
- def sblocca_sx
- unlock_move(4)
- end
- def sblocca_su
- unlock_move(8)
- end
- def sblocca_giu
- unlock_move(2)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement