Jump to content
Rpg²S Forum

[Richiesta] Movimento finestre RGSS


Recommended Posts

Salve a tutti.

Siccome ho in mente un menu molto semplice, avevo intenzione di migliorarlo un pò inserendovi un animazione mentre lo apro. C'è un problema. Non so come animare le finestre attraverso RGSS. C'era un tutorial ma il link è scaduto.

Non è che qualcuno possiede ancora la demo del link oppure sa come muovere le finestre del menu?

Vi ringrazio per l'attenzione, spero possiate darmi una mano.

Link to comment
Share on other sites

alllora Naruto metti la finestra la finestra da dove vuoi che parta, poi nel def update metti un wait e nomedellavariabile.x+=1.

In fine una if con la posizione che vuoi ottenere così smette di muoversi... ok mi sono spiegato da schifo posto la mia scene file così copi e impari

 

#==============================================================================# ** Scene_File#------------------------------------------------------------------------------#  This is a superclass for the save screen and load screen.#============================================================================== class Scene_File  #--------------------------------------------------------------------------  # * Object Initialization  #	 help_text : text string shown in the help window  #--------------------------------------------------------------------------  def initialize(help_text)	@help_text = help_text  end  #--------------------------------------------------------------------------  # * Main Processing  #--------------------------------------------------------------------------  def main	# Make help window	@help_window = Window_Help.new	@help_window.set_text(@help_text)	 @back = Plane.new	@back.bitmap = RPG::Cache.picture("back")	@back.z = 99 	# Make save file window	@savefile_windows = [] 	for i in 0..3	  @savefile_windows.push(Window_SaveFile.new(i, make_filename(i)))	end	# Select last file to be operated	@file_index = $game_temp.last_file_index	@savefile_windows[@file_index].selected = true @savefile_windows[0].x = 640@savefile_windows[1].x = -640@savefile_windows[2].x = 640@savefile_windows[3].x = -640@resize_save = true 	# Execute transition	Graphics.transition	# Main loop	loop do	  # Update game screen	  Graphics.update	  # Update input information	  Input.update	  # Frame update	  update	  # Abort loop if screen is changed	  if $scene != self		break	  end	end	# Prepare for transition	Graphics.freeze	# Dispose of windows	@help_window.dispose	@back.dispose	for i in @savefile_windows	  i.dispose	end  end  #--------------------------------------------------------------------------  # * Frame Update  #--------------------------------------------------------------------------  def update    for i in 0..10   if @savefile_windows[0].x != 0  @savefile_windows[0].x -= 64@savefile_windows[1].x += 64@savefile_windows[2].x -= 64@savefile_windows[3].x += 64 Graphics.updateendend@savefile_windows[0].x = 0@savefile_windows[1].x = 0@savefile_windows[2].x = 0@savefile_windows[3].x = 0        	# Update windows	@help_window.update	for i in @savefile_windows	  i.update	end 	# If C button was pressed	if Input.trigger?(Input::C)	  # Call method: on_decision (defined by the subclasses)	  on_decision(make_filename(@file_index))	  $game_temp.last_file_index = @file_index 	  return	end	# If B button was pressed	if Input.trigger?(Input::B)	  for i in 0..10@savefile_windows[0].x -= 64@savefile_windows[1].x += 64@savefile_windows[2].x -= 64@savefile_windows[3].x += 64Graphics.updateend   	  # Call method: on_cancel (defined by the subclasses)	  on_cancel	  return	end	# If the down directional button was pressed	if Input.repeat?(Input::DOWN)	  # If the down directional button pressed down is not a repeat,	  # or cursor position is more in front than 3	  if Input.trigger?(Input::DOWN) or @file_index < 3		# Play cursor SE		$game_system.se_play($data_system.cursor_se)		# Move cursor down		@savefile_windows[@file_index].selected = false		@file_index = (@file_index + 1) % 4		@savefile_windows[@file_index].selected = true		return	  end	end	# If the up directional button was pressed	if Input.repeat?(Input::UP)	  # If the up directional button pressed down is not a repeat、	  # or cursor position is more in back than 0	  if Input.trigger?(Input::UP) or @file_index > 0		# Play cursor SE		$game_system.se_play($data_system.cursor_se)		# Move cursor up		@savefile_windows[@file_index].selected = false		@file_index = (@file_index + 3) % 4		@savefile_windows[@file_index].selected = true		return	  end	end  end  #--------------------------------------------------------------------------  # * Make File Name  #	 file_index : save file index (0-3)  #--------------------------------------------------------------------------  def make_filename(file_index)	return "Save#{file_index + 1}.rxdata"  endend

http://img256.imageshack.us/img256/7639/ihateyou.gif

Un uomo senza religione è come un pesce senza bicicletta.

http://img18.imageshack.us/img18/3668/decasoft1.png

http://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gif

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...