sprite = Sprite_Character.new(@viewport1,
$game_map.events[事件ID])
sprite.z = 1
以下引用美兽于2007-12-29 9:50:13的发言:
方法很多,
一、依LS所述。
二、临时将事件push到不受色调影响的视口,之后刷新场景。
三、利用图片覆盖,坐标根据,但要善用事件中的“脚本”。
一、Spriteset_Map类中
[quote] @viewport3.z = 5000
@viewport1_5 = Viewport.new(0, 0, 640, 480)
@viewport1_5.z = 5
二、Spriteset_Map类中
[quote]@viewport3.dispose
@viewport1_5.dispose
三、Spriteset_Map类中
[quote] for i in $game_map.events.keys.sort
sprite = Sprite_Character.new(@viewport1, $game_map.events)
@character_sprites.push(sprite)
end
@character_sprites.push(Sprite_Character.new(@viewport1, $game_player))
for i in $game_map.events.keys.sort
sprite = Sprite_Character.new(@viewport1_5, $game_map.events)
@character_sprites.push(sprite)
end
@character_sprites.push(Sprite_Character.new(@viewport1_5, $game_player))
四、Spriteset_Map类中
[quote] @timer_sprite.update
for sprite in @character_sprites
(sprite.tone = $game_screen.tone) if sprite.can_change_tone?
sprite.ox = $game_screen.shake
end
五、Sprite_Character类中
[quote] def update
def can_change_tone?
@character.instance_of?(Game_Player) ?
name = "" : name = @character.instance_variable_get("@event").name
name[/_orz/].nil? ? (return true) : (return false)
end
以下引用美兽于2008-1-4 9:20:27的发言:
仔细思索了下,
若要照顾遮挡变化,必须要将地图元件与角色从一个视口分离出来,稍显麻烦些。
以下为修改方式,大概会增加脚本冲突的风险。
一、Spriteset_Map类中
@viewport3.z = 5000
的下面添加:
@viewport1_5 = Viewport.new(0, 0, 640, 480)
@viewport1_5.z = 5
建造收容无家可归孩子们的居所。
二、Spriteset_Map类中
@viewport3.dispose
的下面添加:
@viewport1_5.dispose
为孩子们留条后路。
三、Spriteset_Map类中
for i in $game_map.events.keys.sort
sprite = Sprite_Character.new(@viewport1, $game_map.events)
@character_sprites.push(sprite)
end
@character_sprites.push(Sprite_Character.new(@viewport1, $game_player))
修改为:
for i in $game_map.events.keys.sort
sprite = Sprite_Character.new(@viewport1_5, $game_map.events)
@character_sprites.push(sprite)
end
@character_sprites.push(Sprite_Character.new(@viewport1_5, $game_player))
将孩子们残忍的遣散。
四、Spriteset_Map类中
@timer_sprite.update
的下面添加:
for sprite in @character_sprites
(sprite.tone = $game_screen.tone) if sprite.can_change_tone?
sprite.ox = $game_screen.shake
end
若是无名无姓的黑孩子,则还以颜色。
五、Sprite_Character类中
def update
的上面添加:
def can_change_tone?
@character.instance_of?(Game_Player) ?
name = "" : name = @character.instance_variable_get("@event").name
name[/_orz/].nil? ? (return true) : (return false)
end
良心发现,若孩子们有御赐之名“_orz”,则不再摧残。
PS:LZ好卑鄙。
雾都孤儿
[本贴由作者于 2008-1-4 9:26:01 最后编辑]
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |