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

Project1

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

[已经过期] 横版战斗脚本出错

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
11 小时
注册时间
2009-12-28
帖子
8
跳转到指定楼层
1
发表于 2012-2-8 22:04:18 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
即时战斗脚本提示
342@actor_command_window.add_command("逃跑")
343if !$game_temp.battle_can_escape
344@actor_command_window.disable_item(@cp_esc

提示342 344 出现错误  两行注释后进去就是:

战斗脚本还有:

还有个问题是 使用了显示地图名与坐标
画面没注标图片
#-----------------------------------------------------------------------------
# ■class map_XY
#-----------------------------------------------------------------------------
#--------------------------------------#
#  大话西游单机论坛  rpg520.5d6d.com   #
#--------------------------------------#

class Window_xy < Window_Base
def initialize
   super(0, 0, 680, 560)  #175, 100
   self.contents = Bitmap.new(width - 32, height - 22)
   self.opacity = 0
   self.back_opacity = 0
   self.contents_opacity = 255
   self.visible = false
   refresh
   @x = $game_player.x
   @y = $game_player.y
   @id = $game_map.map_id
end
def refresh
     @x = $game_player.x
     @y = $game_player.y
     @id = $game_map.map_id
    self.contents.clear
    a = "xy"
    bitmap=Bitmap.new("Graphics/Pictures/#{a}")
    src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
    self.contents.blt(0, 0, bitmap, src_rect)
    $mapnames = load_data("Data/MapInfos.rxdata")
   
    if map_name = nil
      map_name = "测试"
    else
      map_name = $mapnames[@id].name
    end
   
    self.contents.font.bold = true
    self.contents.font.color = Color.new(255, 255, 255, 255)
    self.contents.font.size = 15
    self.contents.draw_text(2, 4, 80, 18, map_name,2)
    self.contents.font.color = Color.new(255, 255, 255, 255)
    self.contents.font.size = 15
    self.contents.draw_text(2, 4, 80, 18, map_name,2)
    self.contents.font.color = Color.new(255, 255, 255, 255)
    self.contents.font.size = 15
    self.contents.draw_text(2, 4, 80, 18, map_name,2)
    self.contents.font.color = Color.new(255, 255, 255, 255)
    self.contents.font.size = 12
    self.contents.draw_text(10, 24, 120, 15, "X:")
    self.contents.font.color = normal_color
    self.contents.font.size = 12
    self.contents.draw_text(0, 15, 45, 32, @x.to_s,2)
    self.contents.font.color = Color.new(255, 255, 255, 255)
    self.contents.font.size = 12
    self.contents.draw_text(60, 15, 90, 32, "Y:")
    self.contents.font.color = Color.new(255, 255, 255, 255)
    self.contents.font.size = 12
    self.contents.draw_text(0, 15, 95, 32, @y.to_s,2)
  end
  
def judge
   return true if @x != $game_player.x
   return true if @y != $game_player.y
   return true if @id != $game_map.map_id
   return false
end
end

class Scene_Map
alias xy_66rpg_main main
def main
   @xy_window = Window_xy.new
   @xy_window.x = - 16
   @xy_window.y = - 16
   xy_66rpg_main
   @xy_window.dispose
end
alias xy_66rpg_update update
def update
   xy_66rpg_update
   
     @xy_window.visible = false
     @xy_window.refresh if @xy_window.judge
   else

  if $game_switches[41]
     @xy_window.visible = true
  else
      @xy_window.visible = false
  end
   
end
end
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

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

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

GMT+8, 2024-11-28 13:38

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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