赞 | 0 |
VIP | 0 |
好人卡 | 110 |
积分 | 1 |
经验 | 24791 |
最后登录 | 2013-6-25 |
在线时间 | 687 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 687 小时
- 注册时间
- 2012-10-29
- 帖子
- 1543
|
本帖最后由 j433463 于 2013-1-25 10:15 编辑
您是想要怎么做?一直显示还是显示一段时间?改显示地图名的脚本是可以,但那改了就没有显示地图名的功能了,
或是像这样一个脚本:- class Window_MapHelp < Window_Base
- #--------------------------------------------------------------------------
- # ● 初始化物件
- #--------------------------------------------------------------------------
- def initialize
- super(0, 0, window_width, fitting_height(1))
- self.visible = false
- @show_wait = 255 #显示提示驻留时间
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 取得视窗的宽度
- #--------------------------------------------------------------------------
- def window_width
- 300
- end
- #--------------------------------------------------------------------------
- # ● 计算视窗内容的宽度
- #--------------------------------------------------------------------------
- def contents_width
- width - standard_padding * 2
- end
- #--------------------------------------------------------------------------
- # ● 更新画面
- #--------------------------------------------------------------------------
- def update
- super
- self.visible = true if $game_party.mhstr != "" && !self.visible
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 重新整理
- #--------------------------------------------------------------------------
- def refresh
- contents.clear
- if (@show_wait != 0 and $game_party.mhstr != "")
- @show_wait -= 1
- else
- $game_party.task_helpstr("")
- self.visible = false
- @show_wait = 255
- end
- draw_text(0, 0, contents_width, line_height, $game_party.mhstr, 1)
- end
- #--------------------------------------------------------------------------
- # ● 开启视窗
- #--------------------------------------------------------------------------
- def open
- refresh
- self
- end
- end
- class Game_Party < Game_Unit
- attr_reader :mhstr
- alias my_init initialize
- def initialize
- my_init
- @mhstr = ""
- end
- def task_helpstr(string = "")
- @mhstr = string
- end
-
- end
- class Scene_Map < Scene_Base
- alias this_init initialize
- def initialize
- this_init
- create_maphelp_window
- end
- def create_maphelp_window
- @map_help_window = Window_MapHelp.new
- @map_help_window.x = Graphics.width - @map_help_window.width
- @map_help_window.y = Graphics.height - @map_help_window.height
- end
- end
复制代码 在任务 NPC 事件中加一行脚本:- $game_party.task_helpstr("要显示的文字")
复制代码 填上您要显示的提示文字,会显示一段时间后隐藏,这样可以吗?
|
|