Project1
标题:
告诉我一些VX的可防卡机的脚本
[打印本页]
作者:
邪神
时间:
2008-7-18 02:18
标题:
告诉我一些VX的可防卡机的脚本
告诉我一些VX的可防卡机的脚本
多多益善
[LINE]1,#dddddd[/LINE]
此贴于 2008-7-21 22:44:19 被版主火鸡三毛老大提醒,请楼主看到后对本贴做出回应。
[LINE]1,#dddddd[/LINE]
版务信息:本贴由楼主自主结贴~
作者:
越前リョーマ
时间:
2008-7-18 02:19
#============================================================================
# ■ VX_事件图形刷新简化 —— By 诡异の猫
#============================================================================
# 脚本内容: 只刷新视野内的事件图形,改善大地图事件过多卡机情况.
#============================================================================
class Sprite_Character < Sprite_Base
#--------------------------------------------------------------------------
# ● 判定图形是否再视野内
#--------------------------------------------------------------------------
def in_view?
add_x = (self.width-32)*4 + 256
add_y = self.height*8
begin_x = $game_map.display_x - add_x
begin_y = $game_map.display_y - add_y
end_x = $game_map.display_x + 4352 + add_x
end_y = $game_map.display_y + 3328 + add_y
limit_x = $game_map.width * 256 - 256 + add_x
limit_y = $game_map.height * 256 - 256 + add_y
char_x = @character.real_x
char_y = @character.real_y
if end_x <= limit_x
return false if char_x < begin_x or char_x > end_x
end
if end_y <= limit_y
return false if char_y < begin_y or char_y > end_y
end
if end_x > limit_x and end_y > limit_y
return false if char_x < begin_x and char_x > end_x - limit_x
return false if char_y < begin_y and char_y > end_y - limit_y
end
return true
end
#--------------------------------------------------------------------------
# ● 更新画面
#--------------------------------------------------------------------------
def update
super
if in_view?
update_bitmap
self.visible = (not @character.transparent)
update_src_rect
self.x = @character.screen_x
self.y = @character.screen_y
self.z = @character.screen_z
self.opacity = @character.opacity
self.blend_type = @character.blend_type
self.bush_depth = @character.bush_depth
end
update_balloon
if @character.animation_id != 0
animation = $data_animations[@character.animation_id]
start_animation(animation)
@character.animation_id = 0
end
if @character.balloon_id != 0
@balloon_id = @character.balloon_id
start_balloon
@character.balloon_id = 0
end
end
end
复制代码
防卡脚本仅能用一个。 [LINE]1,#dddddd[/LINE]
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1