查看: 1511|回复: 2

[已经解决] vx怎样才能做到只显示部分地图名称

[复制链接]
梦石
0
星屑
50
在线时间
34 小时
注册时间
2013-8-10
回帖
28
发表于 2013-10-7 22:28:20 | 显示全部楼层 |阅读模式

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

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

×
RT,我现在的代码如下(部分的)
  1. class Scene_Map < Scene_Base
  2.   alias _start start
  3.   #--------------------------------------------------------------------------
  4.   # ● 开始处理
  5.   #--------------------------------------------------------------------------
  6.   def start
  7.     @map_window = Window_Map.new
  8.     _start
  9.   end
  10.   
  11.   alias _terminate terminate
  12.   def terminate
  13.     @map_window.dispose
  14.     _terminate
  15.   end
  16.   
  17.   alias _update update
  18.   def update
  19.     @map_window.refresh
  20.     _update
  21.   end
  22. end

  23. module RPG
  24.   class Area
  25.     def name_p1
  26.       name = @name.split(/#/)[0]
  27.       return name != nil ? name : ""
  28.     end
  29.     def name_p2
  30.       name = @name.split(/#/)[1]
  31.       return name != nil ? name : ""
  32.     end
  33.     def color_1
  34.       color = @name.split(/#/)[2]
  35.       return color != nil ? color.to_i : TEXT2_COLOR
  36.     end
  37.     def color_2
  38.       color = @name.split(/#/)[3]
  39.       return color != nil ? color.to_i : TEXT3_COLOR
  40.     end
  41.   end
  42. end

  43. class Game_Character
  44.   def area_id
  45.     for area in $data_areas.values
  46.      if in_area?(area)
  47.      return area.id
  48.      end
  49.     end
  50.   end
  51. end
复制代码

神隐的主犯

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

贵宾

发表于 2013-10-7 23:57:51 | 显示全部楼层


  1. module NoShow
  2.                                     { 地图ID => [ 不显示区域ID ] }
  3.      NO_SHOW_MAP = { 1          => [ 1                    ] }

  4. end

  5. class Scene_Map < Scene_Base

  6.   alias _start start
  7.   def start
  8.     @map_window = Window_Map.new unless NoShow::NO_SHOW_MAP [$game_map.map_id].inlcude?($game_player.area_id)
  9.     _start
  10.   end
  11.   
  12.   alias _terminate terminate
  13.   def terminate
  14.     @map_window.dispose if @map_window
  15.     _terminate
  16.   end
  17.   
  18.   alias _update update
  19.   def update
  20.     @map_window.refresh if @map_window
  21.     _update
  22.   end
  23. end

复制代码


无法测试, 出错的话, 自行修改即可.

点评

一直潜水…  发表于 2013-10-9 14:35
其实咱一直都在呀. 哪里来的诈尸了 = =!  发表于 2013-10-8 18:54
围观诈尸前辈…  发表于 2013-10-8 18:48

评分

参与人数 1星屑 +1 收起 理由
铃仙·优昙华院·因幡 + 1 认可答案

查看全部评分


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

使用道具 举报

梦石
0
星屑
782
在线时间
3431 小时
注册时间
2011-6-10
回帖
6325
发表于 2013-10-11 15:22:54 | 显示全部楼层
本帖最后由 上贺茂润 于 2013-10-11 15:28 编辑

我勒个去,楼上诈尸,尸体压在我屋顶上黏糊糊的东西都滴到地板上了,吓死………………………………………………………………在调用面前加个show id貌似可以
长名公主玩家群:372588926 攻略娱乐应有尽有
了解更多新RM游戏,游戏制作请加入RPGmaker支援群:113622890
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部