赞 | 0 |
VIP | 0 |
好人卡 | 3 |
积分 | 1 |
经验 | 36065 |
最后登录 | 2013-11-28 |
在线时间 | 90 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 90 小时
- 注册时间
- 2006-3-16
- 帖子
- 493
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
问题:如何在fuki对话脚本里实现文章自动消失?
真·对话框里含有两个脚本,一个是66加强,一个是fuki,原本自己觉得用手按空格好了,但身边有人提出,需要一起自动消失。可惜自己对脚本方面不是特别懂,虽然有VB基础。但是一样束手无策,请各位大师们帮帮忙,如何能够解决这个问题。
以下,是关于66加强的一段脚本,我似乎懂了,但又似乎混了,fuki脚本里如果加入以下一部分的代码,就会出先第***行脚本出先错误。思路还是没有66大哥清楚,赐教。
self.contents.clear
self.contents.font.color = normal_color
self.contents.font.size = Font.default_size
@x = @y = @max_x = @max_y = @indent = @lines = 0
@left_keep = @right_keep = false
@face_indent = 0
@opacity = 255
@cursor_width = 0
@write_speed = 4
@write_wait = 0
@mid_stop = false
@face_file = nil
@popchar = -2
if $game_temp.choice_start == 0
@x = 8
end
if $game_temp.message_text != nil
@now_text = $game_temp.message_text
#——头像设置
if (/\\[Ff]\[(.+?)\]/.match(@now_text))!=nil then
@face_file = $1 + ".png"
@x = @face_indent = 128
if FileTest.exist?("Graphics/Pictures/" + $1 + ".png")
self.contents.blt(16, 16, RPG::Cache.picture(@face_file), Rect.new(0, 0, 96, 96))
end
@now_text.gsub!(/\\[Ff]\[(.*?)\]/) { "" }
end
#——左半身像设置
if (/\\[Ll]\[(.+?)\]/.match(@now_text))!=nil then
@face = "66rpg_" + $1 + "_h.png"
if $加密 == true
if @left_picture != nil
@left_picture.dispose
end
@left_picture = Sprite.new
@left_picture.bitmap = Bitmap.new("Graphics/battlers/#{@face}")
@left_picture.y = 480-@left_picture.bitmap.height
@left_picture.x = 0
@left_picture.mirror = true
@now_text.gsub!(/\\[Ll]\[(.*?)\]/) { "" }
else
if FileTest.exist?("Graphics/battlers/#{@face}")
if @left_picture != nil
@left_picture.dispose
end
@left_picture = Sprite.new
@left_picture.bitmap = Bitmap.new("Graphics/battlers/#{@face}")
@left_picture.y = 480-@left_picture.bitmap.height
@left_picture.x = 0
@left_picture.mirror = true
@now_text.gsub!(/\\[Ll]\[(.*?)\]/) { "" }
end
end
end
#——右半身像设置
if (/\\[Rr]\[(.+?)\]/.match(@now_text))!=nil then
@face = "66rpg_" + $1 + "_h.png"
if $加密 == true
if @right_picture != nil
@right_picture.dispose
end
@right_picture = Sprite.new
@right_picture.bitmap = Bitmap.new("Graphics/battlers/#{@face}")
@right_picture.y = 480-@right_picture.bitmap.height
@right_picture.x = 640-@right_picture.bitmap.width
@now_text.gsub!(/\\[Rr]\[(.*?)\]/) { "" }
else
if FileTest.exist?("Graphics/battlers/#{@face}")
if @right_picture != nil
@right_picture.dispose
end
@right_picture = Sprite.new
@right_picture.bitmap = Bitmap.new("Graphics/battlers/#{@face}")
@right_picture.y = 480-@right_picture.bitmap.height
@right_picture.x = 640-@right_picture.bitmap.width
@now_text.gsub!(/\\[Rr]\[(.*?)\]/) { "" }
end
end
end
if (/\\[Rr]k/.match(@now_text)) != nil
@right_keep = true
@now_text.sub!(/\\[Rr]k/) { "" }
end
if (/\\[Ll]k/.match(@now_text)) != nil
@left_keep = true
@now_text.sub!(/\\[Ll]k/) { "" }
end
# 显示人物姓名
name_window_set = false
if (/\\[Nn]ame\[(.+?)\]/.match(@now_text)) != nil
name_window_set = true
name_text = $1
@now_text.sub!(/\\[Nn]ame\[(.*?)\]/) { "" }
end
# 文字位置的判定
if (/\\[Pp]\[([-1,0-9]+)\]/.match(@now_text))!=nil then
@popchar = $1.to_i
if @popchar == -1
@x = @indent = 48
@y = 4
end
@now_text.gsub!(/\\[Pp]\[([-1,0-9]+)\]/) { "" }
end
# 开始
begin
last_text = @now_text.clone
@now_text.gsub!(/\\[Vv]\[([IiWwAaSs]?)([0-9]+)\]/) { convart_value($1, $2.to_i) }
end until @now_text == last_text
@now_text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
$game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
end
@now_text.gsub!(/\\\\/) { "\000" }
@now_text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
@now_text.gsub!(/\\[Gg]/) { "\002" }
@now_text.gsub!(/\\[Ss]\[([0-9]+)\]/) { "\003[#{$1}]" }
@now_text.gsub!(/\\[Aa]\[(.*?)\]/) { "\004[#{$1}]" }
@now_text.gsub!(/\\[.]/) { "\005" }
@now_text.gsub!(/\\[|]/) { "\006" }
@now_text.gsub!(/\\[>]/) { "\016" }
@now_text.gsub!(/\\[<]/) { "\017" }
@now_text.gsub!(/\\[!]/) { "\020" }
@now_text.gsub!(/\\[~]/) { "\021" }
@now_text.gsub!(/\\[Ii]/) { "\023" }
@now_text.gsub!(/\\[Oo]\[([0-9]+)\]/) { "\024[#{$1}]" }
@now_text.gsub!(/\\[Hh]\[([0-9]+)\]/) { "\025[#{$1}]" }
@now_text.gsub!(/\\[Bb]\[([0-9]+)\]/) { "\026[#{$1}]" }
@now_text.gsub!(/\\[Kk]\[(.*?)\]/) { "\027[#{$1}]" }
if @popchar >= 0
@text_save = @now_text.clone
@max_x = 0
@max_y = 4
for i in 0..3
line = @now_text.split(/\n/)[3-i]
@max_y -= 1 if line == nil and @max_y <= 4-i
next if line == nil
cx = contents.text_size(line).width
@max_x = cx if cx > @max_x
end
self.width = @max_x + 48 + @face_indent
self.height = (@max_y - 1) * 32 + 64
else
@max_x = self.width - 32 - @face_indent
end
reset_window
if name_window_set
off_x = 0
off_y = -40
space = 2
x = self.x + off_x - space / 2
y = self.y + off_y - space / 2
w = self.contents.text_size(name_text).width + 26 + space
h = 40 + space
@name_window_frame = Window_Frame.new(x, y, w, h)
@name_window_frame.z = self.z + 1
x = self.x + off_x + 4
y = self.y + off_y
@name_window_text = Air_Text.new(x+4, y+6, name_text)
@name_window_text.z = self.z + 2
end
end
reset_window
if $game_temp.choice_max > 0
@item_max = $game_temp.choice_max
self.active = true
self.index = 0
end
if $game_temp.num_input_variable_id > 0
digits_max = $game_temp.num_input_digits_max
number = $game_variables[$game_temp.num_input_variable_id]
@input_number_window = Window_InputNumber.new(digits_max)
@input_number_window.number = number
@input_number_window.x = self.x + 8
@input_number_window.y = self.y + $game_temp.num_input_start * 32
本人正在策划制作一个RMXP历史上的第一部电影,尽管有难度,但我还是要做和别人不一样的事情,虽然R剧很强风头。但相信我的这部《我只在乎你》原创RMXP电影一定可以实现我的一些梦想。
|
|