Project1
标题:
关于多选项问题
[打印本页]
作者:
假面魔王
时间:
2008-1-22 19:50
标题:
关于多选项问题
我想做5个选项,就用了2L的脚本,可是我还有用外挂对话脚本,已使用就出错,有什么办法吗?
作者:
最後一滴淚
时间:
2008-1-22 19:54
class Game_Temp
attr_accessor :need_show_more
attr_accessor :window_pos_y
attr_accessor :choices
alias old_ini initialize
def initialize
old_ini
@need_show_more = false
@window_pos_y = 16
@choices = nil
end
end
class Window_Message < Window_Selectable
alias old_ref refresh
def refresh
if $game_temp.need_show_more
self.y = $game_temp.window_pos_y
self.height = 160 + 32 * ($game_temp.choice_max - 4)
self.contents = Bitmap.new(self.width - 32, self.height - 32)
else
self.height = 160
self.contents = Bitmap.new(self.width - 32, self.height - 32)
end
old_ref
end
#--------------------------------------------------------------------------
# ● 刷新画面
#--------------------------------------------------------------------------
def update
super
# 渐变的情况下
if @fade_in
self.contents_opacity += 24
if @input_number_window != nil
@input_number_window.contents_opacity += 24
end
if self.contents_opacity == 255
@fade_in = false
end
return
end
# 输入数值的情况下
if @input_number_window != nil
@input_number_window.update
# 确定
if Input.trigger?(Input::C)
$game_system.se_play($data_system.decision_se)
$game_variables[$game_temp.num_input_variable_id] =
@input_number_window.number
$game_map.need_refresh = true
# 释放输入数值窗口
@input_number_window.dispose
@input_number_window = nil
terminate_message
end
return
end
# 显示信息中的情况下
if @contents_showing
# 如果不是在显示选择项中就显示暂停标志
if $game_temp.choice_max == 0
self.pause = true
end
# 取消
if Input.trigger?(Input::B)
if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0
$game_system.se_play($data_system.cancel_se)
$game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
$game_variables[100] = $game_temp.choice_cancel_type - 1
$game_temp.need_show_more = false
terminate_message
end
end
# 确定
if Input.trigger?(Input::C)
if $game_temp.choice_max > 0
$game_system.se_play($data_system.decision_se)
$game_variables[100] = self.index
$game_temp.choice_proc.call(self.index)
end
$game_temp.need_show_more = false
terminate_message
end
return
end
# 在渐变以外的状态下有等待显示的信息与选择项的场合
if @fade_out == false and $game_temp.message_text != nil
@contents_showing = true
$game_temp.message_window_showing = true
reset_window
refresh
Graphics.frame_reset
self.visible = true
self.contents_opacity = 0
if @input_number_window != nil
@input_number_window.contents_opacity = 0
end
@fade_in = true
return
end
# 没有可以显示的信息、但是窗口为可见的情况下
if self.visible
@fade_out = true
self.opacity -= 48
if self.opacity == 0
self.visible = false
@fade_out = false
$game_temp.message_window_showing = false
end
return
end
end
end
class Interpreter
def command_102
# 文章已经设置过 message_text 的情况下
if $game_temp.message_text != nil
# 结束
return false
end
# 设置信息结束后待机和返回调用标志
@message_waiting = true
$game_temp.message_proc = Proc.new { @message_waiting = false }
# 设置选择项
$game_temp.message_text = ""
$game_temp.choice_start = 0
if $game_temp.need_show_more
@parameters = [$game_temp.choices, $game_temp.choice_cancel_type]
end
setup_choices(@parameters)
# 继续
return true
end
end
复制代码
作者:
ONEWateR
时间:
2008-1-22 19:55
http://rpg.blue/web/htm/news371.htm
作者:
假面魔王
时间:
2008-1-22 20:10
可我用了外挂对话脚本,一使用上面的脚本就出错,怎么办
作者:
假面魔王
时间:
2008-1-22 20:34
咋办啊?
作者:
沉默的米饭团
时间:
2008-1-22 20:36
把腳本放在最後面試試,在main前就好
作者:
迅雷進
时间:
2008-1-22 20:40
请问可以清楚说明一下你用的是什么对话脚本吗?
Fuki?
提风?
还是苹果梨呢?
作者:
假面魔王
时间:
2008-1-22 20:41
可我原来是要让选择项在角色头上,这样也没了··还有什么更好的解决方法吗?
作者:
假面魔王
时间:
2008-1-22 20:42
或直接给个别的多选择项脚本
作者:
剑七
时间:
2008-1-22 20:43
提示:
作者被禁止或删除 内容自动屏蔽
作者:
小星子
时间:
2008-1-22 23:26
亿万写的脚本应该是针对默认系统环境下的吧...
他的脚本一般都不会兼容那些比较华丽的对话框脚本...
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1