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

Project1

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

[已经过期] XAS队员系统与控规及系统冲突

[复制链接]

Lv1.梦旅人

梦石
0
星屑
60
在线时间
192 小时
注册时间
2011-12-10
帖子
73
跳转到指定楼层
1
发表于 2014-7-7 22:19:52 | 只看该作者 |只看大图 回帖奖励 |正序浏览 |阅读模式

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

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

x
XAS队员系统与空轨迹菜单系统冲突如下图 脚本如下
#==============================================================================#
# MOG_XAS移动动作显示窗口V1.1                                                  #
#==============================================================================#                                            #
#==============================================================================#
#                                描述                                          #
#==============================================================================#
# 这个窗口会在主角得到或者使用物品和技能的时候显示。                           #
#==============================================================================#
# 检查Name_ON在SKILL中的表格来确定在使用或者得到一个TOOL的时候,               #
# 是否显示移动动作显出窗口                                                     #
#==============================================================================#
#                                                                              #
# 需要的图片:                                                                  #
#                                                                              #
# AF_Lay1                                                                      #
# AF_Lay2                                                                      #
# AF_Lay3                                                                      #
#                                                                              #
# 所有图片请务必放在Windowskins文件夹中.                                       #
#                                                                              #         #
#==============================================================================#

module MOG

# 移动动作显示窗口的X坐标..............................[移动动作显示窗口的位置]
  IFA_HUD_X = 200
# 移动动作显示窗口的Y坐标..............................[移动动作显示窗口的位置]
  IFA_HUD_Y = 420
# 信息显示在屏幕上的时间.................................................[秒数]
  IFA_TIME = 2

end

#==============================================================================
# Game_Temp
#==============================================================================
class Game_Temp  
    attr_accessor :if_hud1_x
    attr_accessor :if_hud1_y
    attr_accessor :if_hud1_opa
    attr_accessor :if_hud2_x
    attr_accessor :if_hud2_y
    attr_accessor :if_hud2_opa   
    attr_accessor :if_hud3_x
    attr_accessor :if_hud3_y
    attr_accessor :if_hud3_opa   
    attr_accessor :if_text_x
    attr_accessor :if_text_y
    attr_accessor :if_text_zoom_x
    attr_accessor :if_text_zoom_y
    attr_accessor :if_text_opa   
    attr_accessor :if_text
    attr_accessor :if_text_time
    attr_accessor :if_start
   
#--------------------------------------------------------------------------
# 初始化
#--------------------------------------------------------------------------
alias mog_if_initialize initialize
def initialize   
  mog_if_initialize  
    @if_hud1_x = 0
    @if_hud1_y = 0
    @if_hud1_opa = 0
    @if_hud2_x = 0
    @if_hud2_y = 0
    @if_hud2_opa = 0   
    @if_hud3_x = 0
    @if_hud3_y = 0
    @if_hud3_opa = 0   
    @if_text_x = 0
    @if_text_y = 0
    @if_text_zoom_x = 1.00
    @if_text_zoom_y = 1.00
    @if_text_opa = 0
    @if_text = ""
    @if_text_time = 0
    @if_start = false   
end   
end

#==============================================================================
# Game_Battler
#==============================================================================
module XAS_ACTION
  
#--------------------------------------------------------------------------
# 射击
#--------------------------------------------------------------------------
  alias mog_actname_shoot shoot
    def shoot(action_id)
    mog_actname_shoot(action_id)
    if action_id == nil or action_id == 0
     return  
    end
    item_id = XAS::ITEM_COST[action_id]
    if self.battler.is_a?(Game_Actor) and
      $data_skills[action_id].element_set.include?($data_system.elements.index("Name_ON"))
      if item_id != nil and $game_party.item_number(item_id) == 0
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      skill_sp_cost = $data_skills[action_id].sp_cost
      if self.battler.sp >= skill_sp_cost and
        $game_temp.cast_time == 0
        $game_temp.if_text = $data_skills[action_id].name
        $game_temp.if_text_time = 20 + Database_Bullet::DURATIONS[action_id]   
        $game_temp.if_start = true
      end
    end
  end
end

#==============================================================================
# IFA
#==============================================================================
class Ifa < Sprite
  include MOG
  
#--------------------------------------------------------------------------
# 初始化
#--------------------------------------------------------------------------
  def initialize
     @viewport = Viewport.new(0, 0, 640, 480)
     @viewport.z = 9999     
     super(@viewport)   
     @hud1 = Sprite.new
     @hud1.bitmap = RPG::Cache.windowskin("AF_Lay1")
     @hud1.z = 9000
     @hud1.ox = -IFA_HUD_X + $game_temp.if_hud1_x
     @hud1.oy = -IFA_HUD_Y + $game_temp.if_hud1_y
     @hud1.opacity = $game_temp.if_hud1_opa     
     @hud2 = Sprite.new
     @hud2.bitmap = RPG::Cache.windowskin("AF_Lay2")
     @hud2.z = 9000
     @hud2.ox = -IFA_HUD_X - 50 + $game_temp.if_hud2_x
     @hud2.oy = -IFA_HUD_Y - 20 + $game_temp.if_hud2_y     
     @hud2.opacity = $game_temp.if_hud2_opa      
     @hud3 = Sprite.new
     @hud3.bitmap = RPG::Cache.windowskin("AF_Lay3")
     @hud3.z = 9003
     @hud3.ox = -IFA_HUD_X - 80 + $game_temp.if_hud3_x
     @hud3.oy = -IFA_HUD_Y + 20 + $game_temp.if_hud3_y
     @hud3.opacity = $game_temp.if_hud3_opa     
     @text = Sprite.new
     @text.bitmap = Bitmap.new(120,40)
     @text.z = 9002
     @text.bitmap.font.name = "黑体"
     @text.bitmap.font.size = 20
     @text.bitmap.font.bold = true
     @text.bitmap.font.italic = true
     @text.bitmap.font.color.set(250, 250, 250,220)
     @text.bitmap.draw_hemming_text(0, 0, 120, 40, $game_temp.if_text.to_s,1)
     @text.ox = -IFA_HUD_X - 50 + $game_temp.if_text_x
     @text.oy = -IFA_HUD_Y + 5 + $game_temp.if_text_y
     @text.zoom_x = $game_temp.if_text_zoom_x
     @text.zoom_y = $game_temp.if_text_zoom_y
     @text.opacity = $game_temp.if_text_opa
  end   
   
#--------------------------------------------------------------------------
# 释放
#--------------------------------------------------------------------------
  def dispose        
        @hud1.bitmap.dispose
        @hud1.dispose
        @hud1 = nil   
        @hud2.bitmap.dispose
        @hud2.dispose
        @hud2 = nil   
        @hud3.bitmap.dispose
        @hud3.dispose
        @hud3 = nil   
        @text.bitmap.dispose
        @text.dispose
        @text = nil   
        @viewport.dispose
        @viewport = nil         
  end
      
#--------------------------------------------------------------------------
# 刷新
#--------------------------------------------------------------------------
  def refresh
     $game_temp.if_start = false
     @text.bitmap.clear
     $game_temp.if_hud1_opa = 100
     $game_temp.if_hud2_opa = 100
     $game_temp.if_hud3_opa = 100
     $game_temp.if_text_opa = 100
     $game_temp.if_hud1_x = 100
     $game_temp.if_hud2_x = -100
     $game_temp.if_text_zoom_x = 1.50
     $game_temp.if_hud3_y = 0
     @text.bitmap.draw_hemming_text(0, 0, 120, 40, $game_temp.if_text.to_s,1)
  end
   
#--------------------------------------------------------------------------
# 移动动作显示窗口位置刷新
#--------------------------------------------------------------------------
  def hud_pos_update
     @hud1.ox = -IFA_HUD_X + $game_temp.if_hud1_x
     @hud1.oy = -IFA_HUD_Y + $game_temp.if_hud1_y
     @hud1.opacity = $game_temp.if_hud1_opa     
     @hud2.ox = -IFA_HUD_X - 50 + $game_temp.if_hud2_x
     @hud2.oy = -IFA_HUD_Y - 20 + $game_temp.if_hud2_y   
     @hud2.opacity = $game_temp.if_hud2_opa     
     @hud3.ox = -IFA_HUD_X - 80 + $game_temp.if_hud3_x
     @hud3.oy = -IFA_HUD_Y + 20 + $game_temp.if_hud3_y
     @hud3.opacity = $game_temp.if_hud3_opa   
     @text.ox = -IFA_HUD_X - 50 + $game_temp.if_text_x
     @text.oy = -IFA_HUD_Y + 5 + $game_temp.if_text_y
     @text.zoom_x = $game_temp.if_text_zoom_x
     @text.zoom_y = $game_temp.if_text_zoom_y   
     @text.opacity = $game_temp.if_text_opa   
  end  

#--------------------------------------------------------------------------
# 滑动刷新
#--------------------------------------------------------------------------
  def slide_update
  $game_temp.if_text_time -= 1 if $game_temp.if_text_time > 0   
  if $game_temp.if_text_time > 0   
    if $game_temp.if_hud1_opa < 255   
       $game_temp.if_hud1_opa += 10
       $game_temp.if_hud2_opa += 10
       $game_temp.if_hud3_opa += 10
       $game_temp.if_text_opa += 10
    end   
    if $game_temp.if_hud1_x > 0
       $game_temp.if_hud1_x -= 10
       $game_temp.if_hud2_x += 10
    elsif $game_temp.if_hud1_x < 0   
       $game_temp.if_hud1_x = 0
       $game_temp.if_hud2_x = 0         
    end     
    if $game_temp.if_text_zoom_x > 1.00
       $game_temp.if_text_zoom_x -= 0.1
    elsif $game_temp.if_text_zoom_x < 1.00
      $game_temp.if_text_zoom_x = 1.00
      $game_temp.if_text_zoom_y = 1.00
      $game_temp.if_text_x = 0
    end   
  else   
    if $game_temp.if_hud1_opa  > 0
     $game_temp.if_hud1_opa -= 10
     $game_temp.if_hud2_opa -= 10
     $game_temp.if_hud3_opa -= 10
     $game_temp.if_text_opa -= 10
   end   
   if $game_temp.if_hud1_x < 100
      $game_temp.if_hud1_x -= 10
      $game_temp.if_hud2_x += 10
   elsif $game_temp.if_hud1_x > 100   
      $game_temp.if_hud1_x = 100
      $game_temp.if_hud2_x = 100         
   end     
  end  
  end
  
#--------------------------------------------------------------------------
# 刷新
#--------------------------------------------------------------------------
  def update
    hud_pos_update
    slide_update
    if $game_temp.if_start == true
     refresh
    end
  end
end

#==============================================================================
# Scene_Map
#==============================================================================
class Scene_Map   
  
#--------------------------------------------------------------------------
# Main
#--------------------------------------------------------------------------
  alias mog_ifa_main main
  def main  
    @ifa = Ifa.new
    mog_ifa_main
    @ifa.dispose
    @ifa = nil
  end   
  
#--------------------------------------------------------------------------
# 刷新
#--------------------------------------------------------------------------
  alias mog_ifa_update update
  def update
    mog_ifa_update
    @ifa.update
  end   
end   

$mog_rgss_xas_action_name = true
153行    @text.bitmap.draw_hemming_text(0, 0, 120, 40, $game_temp.if_text.to_s,1) 发生错误

点评

或者直接改成draw_text 用这个看看能不能使用~~!!  发表于 2014-7-7 23:09

Lv2.观梦者

梦石
0
星屑
826
在线时间
584 小时
注册时间
2012-6-3
帖子
366
8
发表于 2014-7-9 00:15:59 | 只看该作者
代码好眼熟,我记得好像以前用过。没想到潜水两年了,还有人用XAS啊。
小白狐一只~
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
60
在线时间
192 小时
注册时间
2011-12-10
帖子
73
7
 楼主| 发表于 2014-7-8 12:58:26 | 只看该作者
hgf 发表于 2014-7-8 12:18
空之轨迹系统http://www.66rpg.com/articles/4946
如果你想帮我,可不可以把他们融合好发给我啊
...

‘连贴’是什么?
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
60
在线时间
192 小时
注册时间
2011-12-10
帖子
73
6
 楼主| 发表于 2014-7-8 12:18:43 | 只看该作者
空之轨迹系统http://www.66rpg.com/articles/4946
如果你想帮我,可不可以把他们融合好发给我啊
我会特别感谢你

点评

我想说,楼主你连贴了0.0  发表于 2014-7-8 12:54
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
60
在线时间
192 小时
注册时间
2011-12-10
帖子
73
5
 楼主| 发表于 2014-7-8 12:07:34 | 只看该作者
范例工程是这个https://rpg.blue/forum.php?mod=v ... 9&highlight=BFS
最新版的那个
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
60
在线时间
192 小时
注册时间
2011-12-10
帖子
73
4
 楼主| 发表于 2014-7-8 12:04:12 | 只看该作者
还有,在哪里看啊?
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
60
在线时间
192 小时
注册时间
2011-12-10
帖子
73
3
 楼主| 发表于 2014-7-8 12:03:47 | 只看该作者
描述方法是什么?
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
378 小时
注册时间
2013-10-14
帖子
215
2
发表于 2014-7-7 23:06:38 | 只看该作者
这个提示说没有draw_hemming_text这个描述方法~~!!

找到这个程序的范例~~!

看看这个draw_hemming_text的描述方法才有办法~~!!
最简单的学习方法就是努力回答别人的问题...
任何教程都没有实践来的重要...
XP小问题都能自己解决了,剩下的就是脚本了...
╰⋛⋋⊱⋋๑角⊱☠c色๑⋌⊰⋌⋚╯
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-10-1 01:18

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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