| 赞 | 1  | 
 
| VIP | 220 | 
 
| 好人卡 | 25 | 
 
| 积分 | 8 | 
 
| 经验 | 51477 | 
 
| 最后登录 | 2013-1-12 | 
 
| 在线时间 | 943 小时 | 
 
 
 
 
 
Lv2.观梦者 花开堪折直须折
  
	- 梦石
 - 0 
 
        - 星屑
 - 791 
 
        - 在线时间
 - 943 小时
 
        - 注册时间
 - 2010-7-17
 
        - 帖子
 - 4963
 
 
  
 
 | 
	
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员  
 
x
 
 本帖最后由 冰舞蝶恋 于 2010-10-14 13:05 编辑  
 
 
 
就这样设定,玩家走进区域就会自动执行事件!- #====================================================
 
 - # ■Auto_Start_Event
 
 - #----------------------------------------------------
 
 - # 区域自动事件
 
 - #====================================================
 
  
- =begin
 
 - 使用方法:设置区域,区域名为eventxx,其中xx为事件ID
 
 -           则角色走入区域后会执行xx事件。
 
 - 注意事项:通过设置移动路线走入不会启动,场所移动时也不会启动事件。
 
 - =end
 
  
- #==============================================================================
 
 - # ■ Game_Player
 
 - #------------------------------------------------------------------------------
 
 - #  处理主角的类。事件启动的判定、以及地图的滚动等功能。
 
 - # 本类的实例请参考 $game_player。
 
 - #==============================================================================
 
  
- class Game_Player < Game_Character
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 判断正面的事件启动
 
 -   #     triggers : 目标队列
 
 -   #--------------------------------------------------------------------------
 
 -   alias auto_start_check_touch_event check_touch_event
 
 -   def check_touch_event
 
 -     
 
 -     auto_start_check_touch_event
 
 -      for area in $data_areas.values
 
 -        if in_area?(area)
 
 -          id = area.name.split("event")[1].to_i
 
 -          if id != 0
 
 -            $game_map.events[id].start
 
 -          end
 
 -        end
 
 -         
 
 -      end
 
 -     
 
 -   end#check_event_trigger_there(triggers)
 
 - end#class Game_Player < Game_Character
 
 
  复制代码 |   
 
评分
- 
查看全部评分
 
 
 
 
 
 |