设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1818|回复: 10
打印 上一主题 下一主题

关于多选项问题

 关闭 [复制链接]
跳转到指定楼层
1
乌有君  发表于 2008-1-22 19:50:19 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
我想做5个选项,就用了2L的脚本,可是我还有用外挂对话脚本,已使用就出错,有什么办法吗?

Lv1.梦旅人

随缘

梦石
0
星屑
55
在线时间
12 小时
注册时间
2007-12-16
帖子
671
2
发表于 2008-1-22 19:54:51 | 只看该作者
  1. class Game_Temp
  2.   attr_accessor :need_show_more
  3.   attr_accessor :window_pos_y
  4.   attr_accessor :choices
  5.   
  6.   alias old_ini initialize
  7.   def initialize
  8.     old_ini
  9.     @need_show_more = false
  10.     @window_pos_y = 16
  11.     @choices = nil
  12.   end
  13. end

  14. class Window_Message < Window_Selectable
  15.   alias old_ref refresh
  16.   def refresh
  17.     if $game_temp.need_show_more
  18.       self.y = $game_temp.window_pos_y
  19.       self.height = 160 + 32 * ($game_temp.choice_max - 4)
  20.       self.contents = Bitmap.new(self.width - 32, self.height - 32)
  21.     else
  22.       self.height = 160
  23.       self.contents = Bitmap.new(self.width - 32, self.height - 32)
  24.     end
  25.     old_ref
  26.   end
  27.   #--------------------------------------------------------------------------
  28.   # ● 刷新画面
  29.   #--------------------------------------------------------------------------
  30.   def update
  31.     super
  32.     # 渐变的情况下
  33.     if @fade_in
  34.       self.contents_opacity += 24
  35.       if @input_number_window != nil
  36.         @input_number_window.contents_opacity += 24
  37.       end
  38.       if self.contents_opacity == 255
  39.         @fade_in = false
  40.       end
  41.       return
  42.     end
  43.     # 输入数值的情况下
  44.     if @input_number_window != nil
  45.       @input_number_window.update
  46.       # 确定
  47.       if Input.trigger?(Input::C)
  48.         $game_system.se_play($data_system.decision_se)
  49.         $game_variables[$game_temp.num_input_variable_id] =
  50.           @input_number_window.number
  51.         $game_map.need_refresh = true
  52.         # 释放输入数值窗口
  53.         @input_number_window.dispose
  54.         @input_number_window = nil
  55.         terminate_message
  56.       end
  57.       return
  58.     end
  59.     # 显示信息中的情况下
  60.     if @contents_showing
  61.       # 如果不是在显示选择项中就显示暂停标志
  62.       if $game_temp.choice_max == 0
  63.         self.pause = true
  64.       end
  65.       # 取消
  66.       if Input.trigger?(Input::B)
  67.         if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0
  68.           $game_system.se_play($data_system.cancel_se)
  69.           $game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
  70.           $game_variables[100] = $game_temp.choice_cancel_type - 1
  71.           $game_temp.need_show_more = false
  72.           terminate_message
  73.         end
  74.       end
  75.       # 确定
  76.       if Input.trigger?(Input::C)
  77.         if $game_temp.choice_max > 0
  78.           $game_system.se_play($data_system.decision_se)
  79.           $game_variables[100] = self.index
  80.           $game_temp.choice_proc.call(self.index)
  81.         end
  82.         $game_temp.need_show_more = false
  83.         terminate_message
  84.       end
  85.       return
  86.     end
  87.     # 在渐变以外的状态下有等待显示的信息与选择项的场合
  88.     if @fade_out == false and $game_temp.message_text != nil
  89.       @contents_showing = true
  90.       $game_temp.message_window_showing = true
  91.       reset_window
  92.       refresh
  93.       Graphics.frame_reset
  94.       self.visible = true
  95.       self.contents_opacity = 0
  96.       if @input_number_window != nil
  97.         @input_number_window.contents_opacity = 0
  98.       end
  99.       @fade_in = true
  100.       return
  101.     end
  102.     # 没有可以显示的信息、但是窗口为可见的情况下
  103.     if self.visible
  104.       @fade_out = true
  105.       self.opacity -= 48
  106.       if self.opacity == 0
  107.         self.visible = false
  108.         @fade_out = false
  109.         $game_temp.message_window_showing = false
  110.       end
  111.       return
  112.     end
  113.   end
  114. end

  115. class Interpreter
  116.   def command_102
  117.     # 文章已经设置过 message_text 的情况下
  118.     if $game_temp.message_text != nil
  119.       # 结束
  120.       return false
  121.     end
  122.     # 设置信息结束后待机和返回调用标志
  123.     @message_waiting = true
  124.     $game_temp.message_proc = Proc.new { @message_waiting = false }
  125.     # 设置选择项
  126.     $game_temp.message_text = ""
  127.     $game_temp.choice_start = 0
  128.     if $game_temp.need_show_more
  129.       @parameters = [$game_temp.choices, $game_temp.choice_cancel_type]
  130.     end
  131.     setup_choices(@parameters)
  132.     # 继续
  133.     return true
  134.   end
  135. end
复制代码
论坛:
回复 支持 反对

使用道具 举报

Lv1.梦旅人

B

梦石
0
星屑
50
在线时间
26 小时
注册时间
2007-8-26
帖子
3693
3
发表于 2008-1-22 19:55:51 | 只看该作者
回复 支持 反对

使用道具 举报

4
乌有君  发表于 2008-1-22 20:10:25
可我用了外挂对话脚本,一使用上面的脚本就出错,怎么办
回复 支持 反对

使用道具

5
乌有君  发表于 2008-1-22 20:34:32
咋办啊?
回复 支持 反对

使用道具

Lv1.梦旅人

论坛御王核潜艇

梦石
0
星屑
50
在线时间
50 小时
注册时间
2006-1-3
帖子
637

冬季迷宫创意大赛冠军

6
发表于 2008-1-22 20:36:26 | 只看该作者
把腳本放在最後面試試,在main前就好
默默存在,畅游于各水域
回复 支持 反对

使用道具 举报

Lv4.逐梦者

ST戰士

梦石
11
星屑
82
在线时间
1155 小时
注册时间
2007-5-5
帖子
3489

第5届短篇游戏比赛季军

7
发表于 2008-1-22 20:40:31 | 只看该作者
请问可以清楚说明一下你用的是什么对话脚本吗?
Fuki?
提风?
还是苹果梨呢?
我是昵称 JIN 的迅雷進,是一位以日本特攝講解爲主的馬來西亞 YouTuber。

歡迎瀏覽我的頻道:JinRaiXin -迅雷進-
回复 支持 反对

使用道具 举报

8
乌有君  发表于 2008-1-22 20:41:40
可我原来是要让选择项在角色头上,这样也没了··还有什么更好的解决方法吗?
回复 支持 反对

使用道具

9
乌有君  发表于 2008-1-22 20:42:07
或直接给个别的多选择项脚本
回复 支持 反对

使用道具

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2009-6-12
帖子
33
10
发表于 2008-1-22 20:43:07 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2025-7-26 16:40

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表