def update_command if Input.trigger?(Input::C) Notification.clear # 命令窗口的光标位置的分支 case @command_window.index when 0 # new game command_new_game when 1 # tutorial command_tutorial when 2 # continue command_continue when 3 # historyical command_historical_battle when 4 # custom battle自定义战斗 command_custom_battle when 5 # setting command_setting when 6 # shutdown command_shutdown end
qq634488405 发表于 2023-3-15 08:31
$game_map.setup(5) # 设置5号地图
$game_player.moveto(1,1) # 移动至1,1
$game_player.turn_down # 主角 ...
1.png (10.42 KB, 下载次数: 7)
金芒芒 发表于 2023-3-15 11:11
command_new_game 改成 command_地图_传送
这样命令语句对吗 command_map_moveto ...
qq634488405 发表于 2023-3-16 08:30
在地图跳转前有没有执行过$game_map=Game_Map.new,看看前后的脚本
金芒芒 发表于 2023-3-15 11:11
command_new_game 改成 command_地图_传送
这样命令语句对吗 command_map_moveto ...
qq634488405 发表于 2023-3-21 08:49
出错的那个复制事件脚本
qq634488405 发表于 2023-3-21 08:49
出错的那个复制事件脚本
#============================================================================== # ■ Window_Title_Command #------------------------------------------------------------------------------ # 标题的主菜单。 #============================================================================== class Window_Title_Command < Window_Base attr_reader :index attr_reader :slide_over #滚动结束 #start load option exit #-------------------------------------------------------------------------- # ● 初始化对像 # actor : 角色 #-------------------------------------------------------------------------- def initialize(index=0) @index = index #选项背景 @button_base = Sprite.new @button_base.bitmap = RPG::Cache.title("title-base-light") @button_base.x = 1200-680+409 @button_base.y = 56 @cur_back = [] @text_list = [] @able = [] #光标 @item_max = 7 for i in 0...@item_max @able[i] = true @cur_back[i] = Sprite.new @cur_back[i].bitmap = RPG::Cache.title("title-normal")#+i.to_s) @cur_back[i].x = 1200-680+435 @cur_back[i].y = 81+45*i @text_list[i] = Sprite.new @text_list[i].bitmap = RPG::Cache.title("index-"+i.to_s) @text_list[i].x = 1200-680+435 + 47 @text_list[i].y = 81+45*i + 9 end @slide_over = false super(0, 0, 0, 0) self.opacity = 0 self.active = true end def origin_x return 1200-680+435 end def origin_y return 81 end #-------------------------------------------------------------------------- # ● 一些方法的重载 #-------------------------------------------------------------------------- def dispose @button_base.dispose for i in 0...@item_max @cur_back[i].dispose @text_list[i].dispose end super end def z=(z) super(z) @button_base.z=z for i in 0...@item_max @cur_back[i].z=z @text_list[i].z=z end end def visible=(visible) super(visible) @button_base.visible = visible for i in 0...@item_max @cur_back[i].visible = visible @text_list[i].visible = visible end end def index=(index) @index=index end def disable_item(i) end #-------------------------------------------------------------------------- # ● 光标不被选中状态 #-------------------------------------------------------------------------- def back_normal(index) if index != -1 @cur_back[index].bitmap = RPG::Cache.title("title-normal")#+i.to_s) @text_list[index].bitmap = RPG::Cache.title("index-"+index.to_s) end end def disable_item(index) @cur_back[index].bitmap = RPG::Cache.title("title-pressed")#+i.to_s) @able[index] = false @text_list[index].bitmap = RPG::Cache.title("index-"+index.to_s+"-black") #@cur_back[index].color = Color.new(0,0,0,128) end #-------------------------------------------------------------------------- # ● 更新光标矩形 #-------------------------------------------------------------------------- def update_cursor_rect # 光标位置不满 0 的情况下 if @index < 0 for i in 0...@item_max back_normal(i) end return end @cur_back[@index].bitmap = RPG::Cache.title("title-highlight")#+i.to_s) @text_list[@index].bitmap = RPG::Cache.title("index-"+index.to_s+"-hl") =begin speed = 40#闪烁速度 if Graphics.frame_count % speed < speed/2 @cur_back[@index].color = Color.new(255,255,255,100+(Graphics.frame_count%speed)*2) else @cur_back[@index].color = Color.new(255,255,255,100+(speed-Graphics.frame_count%speed)*2) end =end end #-------------------------------------------------------------------------- # ● 刷新画面 #-------------------------------------------------------------------------- def update #@cur_back[i].x = 644#640-188 @slide_over = true if self.active # 方向键左被按下的情况下 if Input.repeat?(Input::DOWN) $game_system.se_play($data_system.cursor_se) back_normal(@index) @index = (@index+1)%@item_max until @able[@index] @index = (@index+1)%@item_max end end # 方向键右被按下的情况下 if Input.repeat?(Input::UP) $game_system.se_play($data_system.cursor_se) back_normal(@index) @index = (@index+@item_max-1)%@item_max until @able[@index] @index = (@index+@item_max-1)%@item_max end end end # 刷新光标矩形 update_cursor_rect if @slide_over end end
qq634488405 发表于 2023-3-22 09:08
def self.map_data_init
for i in 1..999
begin
1e.png (54.86 KB, 下载次数: 8)
金芒芒 发表于 2023-3-22 13:59
$game_system.map_data = Marshal.load(Marshal.dump(map)),原来脚本就有个,我复制张贴就没有了好乌龙 ...
qq634488405 发表于 2023-3-23 09:48
脚本有点乱。。。$scene=Scene_Map1.new后自动跳转了,然后$scene=Scene_Map.new,这里又设置了选择框跳 ...
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |