Project1
标题:
汗死……这到底在哪设置的对应坐标……
[打印本页]
作者:
p7l8k90
时间:
2010-8-27 19:58
标题:
汗死……这到底在哪设置的对应坐标……
本帖最后由 p7l8k90 于 2010-8-27 20:48 编辑
我在论坛里找到一个仙剑2战斗菜单,代码如下:
class Window_bacommand1 < Window_Selectable2
def initialize
super(0, 300, 300, 300)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
self.index = index
refresh
# 主循环
end
#===============================================================================
def refresh
self.contents.clear
onbit = Bitmap.new("Graphics/Pictures/圆盘中__02")
upbit = Bitmap.new("Graphics/Pictures/圆盘上__01")
leftbit = Bitmap.new("Graphics/Pictures/圆盘左__01")
downbit = Bitmap.new("Graphics/Pictures/圆盘下__01")
rightbit = Bitmap.new("Graphics/Pictures/圆盘右__01")
bitmap = Bitmap.new("Graphics/Pictures/圆盘")
src_rect=Rect.new(0, 0, bitmap.width, bitmap.height)
self.contents.blt(0, 0, bitmap, src_rect)
self.contents.blt(27, 7, upbit, src_rect)
self.contents.blt(7, 27, leftbit, src_rect)
self.contents.blt(27, 95, downbit, src_rect)
self.contents.blt(95, 27, rightbit, src_rect)
self.contents.blt(49, 49, onbit, src_rect)
case @index
when 0
onbit = Bitmap.new("Graphics/Pictures/圆盘中__02")
upbit = Bitmap.new("Graphics/Pictures/圆盘上__01")
leftbit = Bitmap.new("Graphics/Pictures/圆盘左__01")
downbit = Bitmap.new("Graphics/Pictures/圆盘下__01")
rightbit = Bitmap.new("Graphics/Pictures/圆盘右__01")
bitmap = Bitmap.new("Graphics/Pictures/圆盘")
src_rect=Rect.new(0, 0, bitmap.width, bitmap.height)
self.contents.blt(0, 0, bitmap, src_rect)
self.contents.blt(27, 7, upbit, src_rect)
self.contents.blt(7, 27, leftbit, src_rect)
self.contents.blt(27, 95, downbit, src_rect)
self.contents.blt(95, 27, rightbit, src_rect)
self.contents.blt(49, 49, onbit, src_rect)
when 1
onbit = Bitmap.new("Graphics/Pictures/圆盘中__01")
upbit = Bitmap.new("Graphics/Pictures/圆盘上__02")
leftbit = Bitmap.new("Graphics/Pictures/圆盘左__01")
downbit = Bitmap.new("Graphics/Pictures/圆盘下__01")
rightbit = Bitmap.new("Graphics/Pictures/圆盘右__01")
bitmap = Bitmap.new("Graphics/Pictures/圆盘")
src_rect=Rect.new(0, 0, bitmap.width, bitmap.height)
self.contents.blt(0, 0, bitmap, src_rect)
self.contents.blt(27, 7, upbit, src_rect)
self.contents.blt(7, 27, leftbit, src_rect)
self.contents.blt(27, 95, downbit, src_rect)
self.contents.blt(95, 27, rightbit, src_rect)
self.contents.blt(49, 49, onbit, src_rect)
when 2
onbit = Bitmap.new("Graphics/Pictures/圆盘中__01")
upbit = Bitmap.new("Graphics/Pictures/圆盘上__01")
leftbit = Bitmap.new("Graphics/Pictures/圆盘左__02")
downbit = Bitmap.new("Graphics/Pictures/圆盘下__01")
rightbit = Bitmap.new("Graphics/Pictures/圆盘右__01")
bitmap = Bitmap.new("Graphics/Pictures/圆盘")
src_rect=Rect.new(0, 0, bitmap.width, bitmap.height)
self.contents.blt(0, 0, bitmap, src_rect)
self.contents.blt(27, 7, upbit, src_rect)
self.contents.blt(7, 27, leftbit, src_rect)
self.contents.blt(27, 95, downbit, src_rect)
self.contents.blt(95, 27, rightbit, src_rect)
self.contents.blt(49, 49, onbit, src_rect)
when 3
onbit = Bitmap.new("Graphics/Pictures/圆盘中__01")
upbit = Bitmap.new("Graphics/Pictures/圆盘上__01")
leftbit = Bitmap.new("Graphics/Pictures/圆盘左__01")
downbit = Bitmap.new("Graphics/Pictures/圆盘下__02")
rightbit = Bitmap.new("Graphics/Pictures/圆盘右__01")
bitmap = Bitmap.new("Graphics/Pictures/圆盘")
src_rect=Rect.new(0, 0, bitmap.width, bitmap.height)
self.contents.blt(0, 0, bitmap, src_rect)
self.contents.blt(27, 7, upbit, src_rect)
self.contents.blt(7, 27, leftbit, src_rect)
self.contents.blt(27, 95, downbit, src_rect)
self.contents.blt(95, 27, rightbit, src_rect)
self.contents.blt(49, 49, onbit, src_rect)
when 4
onbit = Bitmap.new("Graphics/Pictures/圆盘中__01")
upbit = Bitmap.new("Graphics/Pictures/圆盘上__01")
leftbit = Bitmap.new("Graphics/Pictures/圆盘左__01")
downbit = Bitmap.new("Graphics/Pictures/圆盘下__01")
rightbit = Bitmap.new("Graphics/Pictures/圆盘右__02")
bitmap = Bitmap.new("Graphics/Pictures/圆盘")
src_rect=Rect.new(0, 0, bitmap.width, bitmap.height)
self.contents.blt(0, 0, bitmap, src_rect)
self.contents.blt(27, 7, upbit, src_rect)
self.contents.blt(7, 27, leftbit, src_rect)
self.contents.blt(27, 95, downbit, src_rect)
self.contents.blt(95, 27, rightbit, src_rect)
self.contents.blt(49, 49, onbit, src_rect)
end
self.contents.font.size = 16
self.contents.draw_text(55, 14, 64, 32, "1")
self.contents.draw_text(11, 55, 64, 32, "2")
self.contents.draw_text(55, 100, 64, 32, "3")
self.contents.draw_text(100, 55, 64, 32, "4")
self.contents.draw_text(55, 55, 64, 32, "5")
end
#===============================================================================
def update
if @index != self.index
refresh
end
if Input.repeat?(Input::DOWN)
$game_system.se_play($data_system.cursor_se)
if @index == 1
@index = 0
else
@index = 3
end
refresh
end
if Input.repeat?(Input::UP)
$game_system.se_play($data_system.cursor_se)
if @index == 3
@index = 0
else
@index = 1
end
refresh
end
if Input.repeat?(Input::LEFT)
$game_system.se_play($data_system.cursor_se)
if @index == 4
@index = 0
else
@index = 2
end
refresh
end
if Input.repeat?(Input::RIGHT)
$game_system.se_play($data_system.cursor_se)
if @index == 2
@index = 0
else
@index = 4
end
refresh
end
end
end
请问,这些图片是如何对应上命令的?
作者:
p7l8k90
时间:
2010-8-27 20:01
额……补充一下,我是说……比如吧,我把选项调到防御,然后按决定键,然后rm的系统就会执行这个命令,那么,使rm的系统执行命令的代码在哪里?
作者:
p7l8k90
时间:
2010-8-27 20:11
完了,这回更糟,把东西放我工程里用不了了!我工程里大部分都用的轩辕美化菜单……会不会是那些玩意出了问题?
作者:
p7l8k90
时间:
2010-8-27 20:15
会不会要和一些其他脚本配合着用?那范例工程里面好像全是默认脚本只有两个不是的,还都是战斗菜单……
作者:
p7l8k90
时间:
2010-8-27 20:33
恩,不显示战斗选单的问题已经解决了,现在只剩下命令对应的问题,麻烦懂行的帮下忙啊……跪拜了!
作者:
p7l8k90
时间:
2010-8-27 20:33
额
作者:
p7l8k90
时间:
2010-8-27 20:34
那个执行命令的语句是不是不在这里面?在Scene_Battle 里面?
作者:
p7l8k90
时间:
2010-8-27 20:37
我看那个脚本里够呛能有,多半在Scene_Battle里,在哪啊…………我晕,难道这么半天没有一个懂行的啊……
作者:
p7l8k90
时间:
2010-8-27 20:42
# ● 刷新画面 (角色命令回合 : 基本命令)
#--------------------------------------------------------------------------
def update_phase3_basic_command
# 按下 B 键的情况下
if Input.trigger?(Input::B)
# 演奏取消 SE
$game_system.se_play($data_system.cancel_se)
# 转向前一个角色的指令输入
phase3_prior_actor
return
end
# 按下 C 键的情况下
if Input.trigger?(Input::C)
# 角色指令窗口光标位置分之
case @actor_command_window.index
when 0 # 攻击
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
# 设置行动
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 0
# 开始选择敌人
start_enemy_select
when 1 # 特技
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
# 设置行动
@active_battler.current_action.kind = 1
# 开始选择特技
start_skill_select
when 2 # 防御
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
# 设置行动
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 1
# 转向下一位角色的指令输入
phase3_next_actor
when 3 # 物品
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
# 设置行动
@active_battler.current_action.kind = 2
# 开始选择物品
start_item_select
end
return
end
end
哪位知道这些什么意思?
作者:
p7l8k90
时间:
2010-8-27 20:47
算了,我自己去找读脚本的教程吧……
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1