赞 | 0 |
VIP | 5 |
好人卡 | 14 |
积分 | 15 |
经验 | 110639 |
最后登录 | 2015-10-15 |
在线时间 | 1157 小时 |
Lv3.寻梦者 小柯的徒弟
- 梦石
- 0
- 星屑
- 1535
- 在线时间
- 1157 小时
- 注册时间
- 2008-5-24
- 帖子
- 3085
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
class Game_Map
alias old_setup setup
def setup(jiong)
if @lv_x == nil
@lv_x = []
@lv_y = []
@lv_direction = []
end
if @lv_x[jiong]==nil
@lv_x[jiong]=[]
@lv_y[jiong]=[]
@lv_direction[jiong]=[]
end
old_setup(jiong)
end
def lv_x(one,two)
return @lv_x[one][two]
end
def lv_y(one,two)
return @lv_y[one][two]
end
def lv_x2(one,two,three)
@lv_x[one][two]=three
end
def lv_y2(one,two,three)
@lv_y[one][two]=three
end
def lv_direction(one,two)
return @lv_direction[one][two]
end
def lv_direction2(one,two,three)
@lv_direction[one][two]=three
end
end
class Game_Event
attr_reader :id
attr_reader :map_id
alias old_update update
def update
old_update
$game_map.lv_x2(@map_id,@id,self.x)
$game_map.lv_y2(@map_id,@id,self.y)
$game_map.lv_direction2(@map_id,@id,self.direction)
end
def initialize(map_id, event)
super()
@map_id = map_id
@event = event
@id = @event.id
@erased = false
@starting = false
@through = true
if $game_map.lv_x(@map_id,@id)!=nil and !$game_temp.lv_switches
@event.x = $game_map.lv_x(@map_id,@id)
@event.y = $game_map.lv_y(@map_id,@id)
@direction = $game_map.lv_direction(@map_id,@id)
end
moveto(@event.x, @event.y)
refresh
end
end
class Game_Temp
attr_accessor :lv_switches
end
支持读档。如果不想要的时候,可以利用 事件中的 【脚本】 功能,
$game_temp.lv_switches = true
又想要时,
$game_temp.lv_switches = false
发出来骗分{/hx}
- class Game_Map
- alias old_setup setup
- def setup(jiong)
- if @lv_x == nil
- @lv_x = []
- @lv_y = []
- @lv_direction = []
- end
- if @lv_x[jiong]==nil
- @lv_x[jiong]=[]
- @lv_y[jiong]=[]
- @lv_direction[jiong]=[]
- end
- old_setup(jiong)
- end
- def lv_x(one,two)
- return @lv_x[one][two]
- end
- def lv_y(one,two)
- return @lv_y[one][two]
- end
- def lv_x2(one,two,three)
- @lv_x[one][two]=three
- end
- def lv_y2(one,two,three)
- @lv_y[one][two]=three
- end
- def lv_direction(one,two)
- return @lv_direction[one][two]
- end
- def lv_direction2(one,two,three)
- @lv_direction[one][two]=three
- end
- end
- class Game_Event
- attr_reader :id
- attr_reader :map_id
- alias old_update update
- def update
- old_update
- $game_map.lv_x2(@map_id,@id,self.x)
- $game_map.lv_y2(@map_id,@id,self.y)
- $game_map.lv_direction2(@map_id,@id,self.direction)
- end
- def initialize(map_id, event)
- super()
- @map_id = map_id
- @event = event
- @id = @event.id
- @erased = false
- @starting = false
- @through = true
- if $game_map.lv_x(@map_id,@id)!=nil and @event.name =~ "保留之"
- @event.x = $game_map.lv_x(@map_id,@id)
- @event.y = $game_map.lv_y(@map_id,@id)
- @direction = $game_map.lv_direction(@map_id,@id)
- end
- moveto(@event.x, @event.y)
- refresh
- end
- end
复制代码
外加一个版本。只要是有"保留之"的名的事件,就会保留。但没有前一个版本的开关 |
|