本帖最后由 苍禾 于 2014-7-30 14:40 编辑 用的是这位的脚本https://rpg.blue/thread-366416-1-1.html 测试的时候出现了这个: ↑这是。。。啥意思? 228~238的代码 def setup_page(new_page) ...
class Game_Event #-------------------------------------------------------------------------- # ● 设置事件页的设置 #-------------------------------------------------------------------------- def setup_page_settings @tile_id = @page.graphic.tile_id @character_name = @page.graphic.character_name @character_index = @page.graphic.character_index if @original_direction != @page.graphic.direction @direction = @page.graphic.direction @original_direction = @direction @prelock_direction = 0 end if @original_pattern != @page.graphic.pattern @pattern = @page.graphic.pattern @original_pattern = @pattern end @move_type = @page.move_type @move_speed = @page.move_speed @move_frequency = @page.move_frequency @move_route = @page.move_route @move_route_index = 0 @move_route_forcing = false @walk_anime = @page.walk_anime @step_anime = @page.step_anime @direction_fix = @page.direction_fix @through = @page.through @priority_type = @page.priority_type @trigger = @page.trigger @list = @page.list @list.each do |eve| if eve.code == 101 add_character_face(eve) if @character_name != "" && has_face?(eve) end end @interpreter = @trigger == 4 ? Game_Interpreter.new : nil end #-------------------------------------------------------------------------- # ● 判断对话时的人物头像是否存在 #-------------------------------------------------------------------------- def has_face?(eve) return true if @character_name.include?("People") && @character_name <= "People4" return true if @character_name.include?("Actor") return true if @character_name.include?("Evil") return true if @character_name.include?("Spiritual") return false end #-------------------------------------------------------------------------- # ● 自动添加对话时的人物头像 #-------------------------------------------------------------------------- def add_character_face(eve) eve.parameters[0], eve.parameters[1] = @character_name, @character_index endend
class Game_Event #-------------------------------------------------------------------------- # ● 设置事件页的设置 #-------------------------------------------------------------------------- def setup_page_settings @tile_id = @page.graphic.tile_id @character_name = @page.graphic.character_name @character_index = @page.graphic.character_index if @original_direction != @page.graphic.direction @direction = @page.graphic.direction @original_direction = @direction @prelock_direction = 0 end if @original_pattern != @page.graphic.pattern @pattern = @page.graphic.pattern @original_pattern = @pattern end @move_type = @page.move_type @move_speed = @page.move_speed @move_frequency = @page.move_frequency @move_route = @page.move_route @move_route_index = 0 @move_route_forcing = false @walk_anime = @page.walk_anime @step_anime = @page.step_anime @direction_fix = @page.direction_fix @through = @page.through @priority_type = @page.priority_type @trigger = @page.trigger @list = @page.list @list.each do |eve| if eve.code == 101 add_character_face(eve) if @character_name != "" && has_face?(eve) end end @interpreter = @trigger == 4 ? Game_Interpreter.new : nil end #-------------------------------------------------------------------------- # ● 判断对话时的人物头像是否存在 #-------------------------------------------------------------------------- def has_face?(eve) return true if @character_name.include?("People") && @character_name <= "People4" return true if @character_name.include?("Actor") return true if @character_name.include?("Evil") return true if @character_name.include?("Spiritual") return false end #-------------------------------------------------------------------------- # ● 自动添加对话时的人物头像 #-------------------------------------------------------------------------- def add_character_face(eve) eve.parameters[0], eve.parameters[1] = @character_name, @character_index end end
查看全部评分
折叠内容标题(非必须)
折叠内容
站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作
GMT+8, 2024-11-12 23:09
Powered by Discuz! X3.1
© 2001-2013 Comsenz Inc.