При загрузке и сохранение вашей игры все кто в вашей пати как бы двигаються вперед , Выглядит красиво=))
[cut]
#==========================================================================
# ** SG Animated Savefiles
#==========================================================================
#==========================================================================
module SG
AnimSaveDisableRewrite = false
AnimSaveReset = true
AnimSaveSpeed = 9
end
#==========================================================================
#
# To check for updates or find more scripts, visit:
# http://www.gamebaker.com/rmxp/scripts/
# Our RMVX scripts: http://www.gamebaker.com/rmvx/scripts/
#
# This script was meant to be exclusive to GameBaker.com
#
# Instructions: http://www.gamebaker.com/rmxp/scripts/e/animated-savefiles.php
# Discussion/Help: http://forums.gamebaker.com/showthread.php?t=118
#
#==========================================================================
if Object.const_defined?( SDK )
SDK.log( SG Animated Savefiles , sandgolem , 2, 15.01.08 )
@sg_animsavefile_disabled = true if !SDK.enabled?( SG Animated Savefiles )
end
if !@sg_animsavefile_disabled
#--------------------------------------------------------------------------
class Window_SaveFile Window_Base
attr_accessor :sg_animstage
if !SG::AnimSaveDisableRewrite
begin
SDK.log_overwrite(:Window_SaveFile, :refresh)
rescue
end
def refresh
@sg_animstage = -1 if @sg_animstage == 3 or @sg_animstage == nil
@sg_animstage += 1
self.contents.clear
# Draw file number
self.contents.font.color = normal_color
name = File#{@file_index + 1}
self.contents.draw_text(4, 0, 600, 32, name)
@name_width = contents.text_size(name).width
# If save file exists
if @file_exist
# Draw character
for i in 0...@characters.size
bitmap = RPG::Cache.character(@characters[i][0], @characters[i][1])
cw = bitmap.rect.width / 4
ch = bitmap.rect.height / 4
#--------------------------------------------------------------------------
# This line is all you need to change in another save script
src_rect = Rect.new(cw * @sg_animstage, 0, cw, ch)
#--------------------------------------------------------------------------
x = 300 - @characters.size * 32 + i * 64 - cw / 2
self.contents.blt(x, 68 - ch, bitmap, src_rect)
end
# Draw play time
hour = @total_sec / 60 / 60
min = @total_sec / 60 % 60
sec = @total_sec % 60
time_string = sprintf( %02d:%02d:%02d , hour, min, sec)
self.contents.font.color = normal_color
self.contents.draw_text(4, 8, 600, 32, time_string, 2)
# Draw timestamp
self.contents.font.color = normal_color
time_string = @time_stamp.strftime( %Y/%m/%d %H:%M )
self.contents.draw_text(4, 40, 600, 32, time_string, 2)
end
end
else
alias_method :sg_animatedsave_refresh, :refresh
def refresh
@sg_animstage += 1
@sg_animstage = 0 if @sg_animstage == 4
sg_animatedsave_refresh
end
end
end
class Scene_File
alias_method :sg_animatedsave_update, :update
def update
@sg_animation_speed = 0 if @sg_animation_speed == nil
@sg_animation_speed += 1
sg_animatesave if @sg_animation_speed == SG::AnimSaveSpeed
sg_animatedsave_update
end
def sg_animatesave
@savefile_windows[@file_index].refresh
if SG::AnimSaveReset
for i in 0...@savefile_windows.size
if i != @file_index && @savefile_windows[i].sg_animstage != 0
@savefile_windows[i].sg_animstage = -1
@savefile_windows[i].refresh
end
end
end
@sg_animation_speed = 0
end
end
#--------------------------------------------------------------------------
end
#==========================================================================
# End of file! You can find more of my scripts at http://www.gamebaker.com
#==========================================================================
[/cut]