查看: 4468|回复: 21

关于vx战斗的时候不显示选项而显示图片

  [复制链接]

敌敌畏

梦石
0
星屑
80
在线时间
52 小时
注册时间
2008-5-12
回帖
1667
发表于 2008-9-6 16:07:22 | 显示全部楼层 |阅读模式

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

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

×
说白了就是vx图片战斗菜单,昨天做了一天效果也不理想,不知道谁有有这个脚本给我一个(找死我了)...如果没有给个思路,3q...
如果能解决的话追加积分

版务信息:本贴由楼主自主结贴~

天仙

梦石
0
星屑
720
在线时间
184 小时
注册时间
2008-4-15
回帖
4872

贵宾

发表于 2008-9-6 16:16:41 | 显示全部楼层
不是有个图片标题画面的脚本吗?
拿去叁考看看
VA脚本开工中...
偷窃脚本1.0 - 已完成
回复

使用道具 举报

敌敌畏

梦石
0
星屑
80
在线时间
52 小时
注册时间
2008-5-12
回帖
1667
 楼主| 发表于 2008-9-6 16:22:31 | 显示全部楼层
已经开始“参考”了,我的悟性真“好”{/gg}
回复

使用道具 举报

神隐的主犯

梦石
0
星屑
553
在线时间
271 小时
注册时间
2008-2-22
回帖
7534

贵宾

发表于 2008-9-6 17:21:56 | 显示全部楼层


这个样子的么??
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~

《天空之城 —— 破碎的命运》
回复

使用道具 举报

敌敌畏

梦石
0
星屑
80
在线时间
52 小时
注册时间
2008-5-12
回帖
1667
 楼主| 发表于 2008-9-6 17:23:45 | 显示全部楼层
以下引用八云紫于2008-9-6 9:21:56的发言:



这个样子的么??

是啊
我自己制做的太弱了,555
回复

使用道具 举报

神隐的主犯

梦石
0
星屑
553
在线时间
271 小时
注册时间
2008-2-22
回帖
7534

贵宾

发表于 2008-9-6 17:28:12 | 显示全部楼层
  1. #==============================================================================
  2. # ■ Position
  3. #------------------------------------------------------------------------------
  4. #  定义战斗角色站位,队伍站位,技能范围坐标的模块。
  5. #==============================================================================

  6. module Position
  7.   HEXAGON =  [[50, 10],[5, 30],[95, 30]]
  8. end
  9. #==============================================================================
  10. # ■ Window_ActorCommand
  11. #------------------------------------------------------------------------------
  12. #  战斗画面、选择战斗与逃跑的窗口。
  13. #==============================================================================

  14. class Window_ActorCommand < Window_Selectable
  15.   #--------------------------------------------------------------------------
  16.   # ● 初始化对象
  17.   #--------------------------------------------------------------------------
  18.   def initialize(actor)
  19.     super(128, 128, 544, 416)
  20.     @actor = actor
  21.     self.opacity = 0
  22.     @column_max = 6
  23.     @item_max = 6
  24.     self.index = 0
  25.     @index_index = self.index
  26.     draw_icon(@index, @actor.pressed_key[@index], Position::HEXAGON[0][0], Position::HEXAGON[0][1], 255)
  27.     draw_icon(@index - 1, @actor.pressed_key[@index-1], Position::HEXAGON[1][0], Position::HEXAGON[1][1], 100)
  28.     draw_icon(@index + 1, @actor.pressed_key[(@index+1)%5], Position::HEXAGON[2][0], Position::HEXAGON[2][1], 100)
  29.     refresh
  30.   end
  31.   #------------------------------
  32.   # ● 刷新
  33.   #------------------------------
  34.   def refresh
  35.     unless @index_index == @index
  36.       self.contents.clear
  37.       draw_icon(@index, @actor.pressed_key[@index], Position::HEXAGON[0][0], Position::HEXAGON[0][1], 255)
  38.       draw_icon(@index - 1, @actor.pressed_key[@index-1], Position::HEXAGON[1][0], Position::HEXAGON[1][1], 100)
  39.       draw_icon(@index + 1, @actor.pressed_key[(@index+1)%5], Position::HEXAGON[2][0], Position::HEXAGON[2][1], 100)
  40.       @index_index = @index
  41.     end
  42.     update
  43.   end
  44.   #--------------------------------------------------------------------------
  45.   # ● 描绘图标
  46.   #--------------------------------------------------------------------------
  47.   def draw_icon(index, number, x, y, op)
  48.     index = 5 if index < 0
  49.     index = 0 if index > 5
  50.     bitmap = Bitmap.new("Graphics/Battle/#{Material::BATTLE_INSTRUCTION}")
  51.     w = bitmap.width / 2
  52.     h = bitmap.height / 6
  53.     rect = Rect.new(number * w, index * h, w, h)
  54.     self.contents.blt(x, y, bitmap, rect, op)
  55.     bitmap.dispose
  56.   end
  57.   #--------------------------------------------------------------------------
  58.   # ● 光标向下移动
  59.   #     wrap : 允许跳过
  60.   #--------------------------------------------------------------------------
  61.   def cursor_down(wrap = false)
  62.     @index += 1
  63.     @index = 0 if @index > 5
  64.   end
  65.   #--------------------------------------------------------------------------
  66.   # ● 光标向上移动
  67.   #     wrap : 允许跳过
  68.   #--------------------------------------------------------------------------
  69.   def cursor_up(wrap = false)
  70.     @index -= 1
  71.     @index = 5 if @index < 0
  72.   end
  73.   #--------------------------------------------------------------------------
  74.   # ● 光标向右移动
  75.   #     wrap : 允许跳过
  76.   #--------------------------------------------------------------------------
  77.   def cursor_right(wrap = false)
  78.     @index += 1
  79.     @index = 0 if @index > 5
  80.   end
  81.   #--------------------------------------------------------------------------
  82.   # ● 光标向左移动
  83.   #     wrap : 允许跳过
  84.   #--------------------------------------------------------------------------
  85.   def cursor_left(wrap = false)
  86.     @index -= 1
  87.     @index = 5 if @index < 0
  88.   end
  89.   #--------------------------------------------------------------------------
  90.   # ● 获取项目要描画的矩形
  91.   #     index : 项目编号
  92.   #--------------------------------------------------------------------------
  93.   def item_rect(index)
  94.     rect = Rect.new(0, 0, 0, 0)
  95.     return rect
  96.   end
  97.   
  98.   def setup(actor)
  99.     @actor = actor
  100.    end
  101. end  
复制代码


这个是脚本,不能直接使用。(因为是为我自己的游戏而写的)自己改改吧。

《天空之城 —— 破碎的命运》
回复

使用道具 举报

敌敌畏

梦石
0
星屑
80
在线时间
52 小时
注册时间
2008-5-12
回帖
1667
 楼主| 发表于 2008-9-6 17:32:54 | 显示全部楼层
OK,谢谢啦,努力专研ing,追加一张好人卡{/wx}
回复

使用道具 举报

神隐的主犯

梦石
0
星屑
553
在线时间
271 小时
注册时间
2008-2-22
回帖
7534

贵宾

发表于 2008-9-6 17:33:46 | 显示全部楼层
那个,感觉写的很乱。

《天空之城 —— 破碎的命运》
回复

使用道具 举报

敌敌畏

梦石
0
星屑
80
在线时间
52 小时
注册时间
2008-5-12
回帖
1667
 楼主| 发表于 2008-9-6 17:38:42 | 显示全部楼层
没,只是变量的名字有点诡异
回复

使用道具 举报

神隐的主犯

梦石
0
星屑
553
在线时间
271 小时
注册时间
2008-2-22
回帖
7534

贵宾

发表于 2008-9-6 17:42:17 | 显示全部楼层
呵呵,那个 @index_index 其实很用来记忆光标用的,用来刷新的。

《天空之城 —— 破碎的命运》
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部