赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 2 |
经验 | 4841 |
最后登录 | 2018-3-30 |
在线时间 | 677 小时 |
Lv1.梦旅人 饕餮
- 梦石
- 0
- 星屑
- 222
- 在线时间
- 677 小时
- 注册时间
- 2011-5-9
- 帖子
- 486
|
没有VIP呀~~希望不要嫌弃这500经验~~~
问题是这样的,我想在这窗口里显示我想要的变量,于是我就输入 \v[1] 我想显示一号变量,可是.........
你看:
怎么显示不出来呀?
我不懂了···怎么才能显示呀??
脚本在这里~帮帮我啦 真的不会脚本···
这是脚本:- #==============================================================================
- # ■ Scene_pet
- #------------------------------------------------------------------------------
- # 处理画面的类。
- #==============================================================================
- class Status_soumin < Scene_Base
- #--------------------------------------------------------------------------
- # ● 初始化对像
- # menu_index : 命令窗口光标初始位置
- #--------------------------------------------------------------------------
- def initialize(id,menu_index = 0)
- @menu_index = menu_index
- @id=id
- end
- #--------------------------------------------------------------------------
- # ● 开始处理
- #--------------------------------------------------------------------------
- def start
- super
- create_menu_background
- create_command_window
- @gold_window = Window_Gold.new(0, 360)
- @soumin_window = Window_soumin.new(160, 0,@id)
- end
- #--------------------------------------------------------------------------
- # ● 结束处理
- #--------------------------------------------------------------------------
- def terminate
- super
- dispose_menu_background
- @command_window.dispose
- @gold_window.dispose
- @soumin_window.dispose
- end
- #--------------------------------------------------------------------------
- # ● 更新画面
- #--------------------------------------------------------------------------
- def update
- super
- update_menu_background
- @command_window.update
- @gold_window.update
- @soumin_window.update if @soumin_window.active
- if @command_window.active
- update_command_selection
- end
- end
- #--------------------------------------------------------------------------
- # ● 生成命令窗口
- #--------------------------------------------------------------------------
- def create_command_window
- s1 = "人物属性"
- s2 = "返回"
- @command_window = Window_Command.new(160, [s1,s2])
- @command_window.index = @menu_index
- end
- #--------------------------------------------------------------------------
- # ● 更新命令窗口
- #--------------------------------------------------------------------------
- def update_command_selection
- if Input.trigger?(Input::B)
- Sound.play_cancel
- $scene = Scene_Menu.new(3)
- elsif Input.trigger?(Input::C)
- if $game_party.members.size == 0 and @command_window.index < 4
- Sound.play_buzzer
- return
- elsif $game_system.save_disabled and @command_window.index == 4
- Sound.play_buzzer
- return
- end
- Sound.play_decision
- case @command_window.index
- when 0 #人物属性
- $scene = Status_soumin.new(0)
- when 1 #离开
- $scene = Scene_Menu.new(3)
- end
- end
- end
-
- end
- #==============================================================================
- # ■ Window_MenuStatus
- #------------------------------------------------------------------------------
- # 显示菜单画面和同伴状态的窗口。
- #==============================================================================
- class Window_soumin < Window_Selectable
- #--------------------------------------------------------------------------
- # ● 初始化对像
- # x : 窗口 X 座标
- # y : 窗口 Y 座标
- #--------------------------------------------------------------------------
- def initialize(x, y,id)
- super(x, y, 384, 416)
- @id=id
- refresh
- self.active = false
- self.index = -1
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- x=10
- y=0
- self.contents.font.color = text_color(3)
- self.contents.draw_text(x, y, 346, 24, "寿命:\v[1]")
- y+=24
- self.contents.draw_text(x, y, 346, 24, "成长:\v[1]")
- y+=24
- self.contents.draw_text(x, y, 346, 24, "健壮:\v[1]")
- y+=24
- self.contents.draw_text(x, y, 346, 24, "魅力:\v[1]")
- y+=24
- end
- #--------------------------------------------------------------------------
- # ● 更新光标
- #--------------------------------------------------------------------------
- def update_cursor
- if @index < 0 # 无光标
- self.cursor_rect.empty
- elsif @index < @item_max # 一般
- self.cursor_rect.set(0, @index * 96, contents.width, 96)
- elsif @index >= 100 # 使用本身
- self.cursor_rect.set(0, (@index - 100) * 96, contents.width, 96)
- else # 全体
- self.cursor_rect.set(0, 0, contents.width, @item_max * 96)
- end
- end
- end
- class Window_soumin2 < Window_Selectable
- #--------------------------------------------------------------------------
- # ● 初始化对像
- # x : 窗口 X 座标
- # y : 窗口 Y 座标
- #--------------------------------------------------------------------------
- def initialize(x, y,id)
- super(x, y, 384, 416)
- @id=id
- refresh
- self.active = false
- self.index = -1
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- x=10
- y=0
- self.contents.font.color = text_color(0)
- self.contents.draw_text(x, y, 346, 24, "装备说明.")
- y+=24
- self.contents.draw_text(x, y, 346, 24, "属性说明.")
- end
- #--------------------------------------------------------------------------
- # ● 更新光标
- #--------------------------------------------------------------------------
- def update_cursor
- if @index < 0 # 无光标
- self.cursor_rect.empty
- elsif @index < @item_max # 一般
- self.cursor_rect.set(0, @index * 96, contents.width, 96)
- elsif @index >= 100 # 使用本身
- self.cursor_rect.set(0, (@index - 100) * 96, contents.width, 96)
- else # 全体
- self.cursor_rect.set(0, 0, contents.width, @item_max * 96)
- end
- end
- end
复制代码 |
|