查看: 1803|回复: 0

[已经过期] 求XP的传送系统移植VA。

[复制链接]
梦石
0
星屑
50
在线时间
125 小时
注册时间
2006-7-19
回帖
225
发表于 2016-1-8 22:23:18 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 天涯孤客 于 2016-1-9 22:34 编辑

如题,希望大大们帮帮忙。在此谢过。
功能就是点开NPC后,诸多设置好的地点名称,点击后,主角传送到该地点。

虽也可以用变量实现,但是选项框只能有4项选择,且排列不好看,体验感不好。


此为XP原脚本:
[pre lang="ruby"]#==============================================================================
# by bbaugle 本脚本来自www.66RPG.com。使用或转载时请保留此信息。
#==============================================================================
class Scene_Fly
  def initialize(names=nil,place=nil,x=nil,y=nil)
    @names = names
    @place = place
    @x = x
    @y = y
  end
  def main
    @a = Window_Command.new(240,@names)
    @a.x = 320 - @a.width / 2
    @a.height = 320
    @a.y = 240 - @a.height/ 2
    @b = Window_Base.new(0, 0, 240, 52)
    @b.contents = Bitmap.new(240-32, 320-32)
    @b.y = 10
    @b.x = 320 - @a.width/2
    @b.contents.draw_text(35, 0, 240, 16, "请选择需要传送的地点")
    @gold = Window_Base.new(640-128,10,128,48)
    @gold.contents = Bitmap.new(128,48)
    gold = $game_party.gold
    @gold.contents.draw_text(36,0,128,16,gold.to_s)
    @gold.contents.draw_text(0,0,64,16,"金钱")
    @gold.opacity = 230
    Graphics.transition
    loop do;
      Graphics.update
      Input.update
      update
      if $scene != self then;
        break
      end
    end
    Graphics.freeze
    @a.dispose
    @b.dispose
    @gold.dispose
  end
  def update
    @a.update
    @b.update
    @gold.update
    if Input.trigger?(Input::B)
      $scene = Scene_Map.new
    end
    if Input.trigger?(Input::C)
      $game_map.setup(@place[@a.index])
      $game_player.moveto(@x[@a.index],@y[@a.index])
      $game_player.refresh
      $game_map.autoplay
      $game_map.update
      $scene = Scene_Map.new
    end
  end
end
[/pre]

点评

最近那么安静? 我在玩儿单机么?  发表于 2016-1-9 22:34
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

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

在本版发帖返回顶部