http://rpg.blue/viewthread.php?tid=104199&page=2 中
[quote]劍之飛龍☆
点数:103
称号:龙骑
经验:42882
帖子:2209
注册:2007-12-31
状态:离线 档案 搜索 邮件 短信 引用 第16楼
我确实有某个脚本可以很好解决某些问题
$game_map.events[@event_id].moveto($game_map.width,0)
# @event_id 是本事件的ID,自己可以更换。
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 !$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
以下引用「旅」于2009-5-29 13:38:06的发言:
龙皇过奖了>////<
现在就去发帖骗分。
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |