캐릭터의 주위에 시야범위를 설정합니다.
멀리 있는 사물은 보이지않습니다
이 스크립트를 사용하려면 아래에 보이는
그림을 다운로드받으셔야만 합니다.
위 그림파일은 Graphics/ System 폴더안에 넣어주세요.
그림파일명은 light01 이라고 반드시 저장해서 넣어주세요.
그리고 스크립트는 아래와같습니다
#============================================================================== # 걳RGSS2 # STR13_긚?긞긣깋귽긣 v1.1 # # 갋긵깒귽깂?궻뢂댪귩뼻귡궘뙥궧귡뎶뢯뱳궸럊뾭궢귏궥갃 # 갋긚?긞긣깋귽긣궻됪몴궼System긲긅깑?궸귽깛??긣궢궲궘궬궠궋갃 # 갋깋귽긣궻럚믦궼귽긹깛긣긓?깛긤궻긚긏깏긵긣뱳궳뛱궋귏궥갃 # 걵띍룊궔귞깋귽긣귩?렑궠궧귡뤾뜃궼갂빥쀱룉뿚궳긲긅긐럚믦궢궫뚣갂 # ?귽긹깛긣궻덇렄뤑땸귩뛱궎궶궵궻뺴?귩롦궯궲궘궬궠궋갃 # 겍?긞긵댷벍귩뛱궎궴륃뺪궕룊딖돸궠귢귏궥갃 # 걵긓긾깛귽긹깛긣뱳궳럚믦긬??깛궻듖뿚궥귡럷귩긆긚긚긽궢귏궥갃 # 갋먣뼻빒궕STR12궴궩궯궘귟궶궻궼럅뾩궳궥 if false # 댥돷귩긓?깛긤궻긚긏깏긵긣뱳궸?귟븊궚궲깋귽긣럚믦 l = $game_map l.sl_name = "light01" # 긲?귽깑뼹 l.sl_blend_type = 1 # 뜃맟뺴? l.sl_opacity = 128 # 벁뼻뱗 # 궞궞귏궳 # 뺚뫉 # 갋뜃맟뺴??0 = 믅륂?1 = 돿럁?2 = 뙵럁 # 갋벁뼻뱗궼0~255 end #------------------------------------------------------------------------------ # # 뛛륷뿗쀰 # 걻1.0겏1.1 #?긚?긞긣깋귽긣궕궥궙궸뵿뎕궠귢궶궋긫긐귩뢇맫 # #============================================================================== # 걾 Game_Map #============================================================================== class Game_Map #-------------------------------------------------------------------------- # 걶 뚺둎귽깛긚?깛긚빾릶 #-------------------------------------------------------------------------- attr_accessor :sl_name attr_accessor :sl_blend_type attr_accessor :sl_opacity #-------------------------------------------------------------------------- # 걳 긄귽깏귺긚 #-------------------------------------------------------------------------- alias setup_str13 setup def setup(map_id) setup_str13(map_id) @sl_name = "" #여기에 시야범위를 사용할 맵ID를 적으세요 @sl_blend_type = 1 @sl_opacity = 128 end end #============================================================================== # 걾 Spriteset_Map #============================================================================== class Spriteset_Map #-------------------------------------------------------------------------- # 걶 깋귽긣궻띿맟 #-------------------------------------------------------------------------- def create_s_light @s_light = Sprite.new(@viewport2) @s_light.z = 0 @s_light.visible = false end #-------------------------------------------------------------------------- # 걶 깋귽긣궻됶뺳 #-------------------------------------------------------------------------- def dispose_s_light @s_light.dispose end #-------------------------------------------------------------------------- # 걶 깋귽긣궻뛛륷 #-------------------------------------------------------------------------- def update_s_light if @s_light_name != $game_map.sl_name @s_light_name = $game_map.sl_name if @s_light.bitmap != nil @s_light.bitmap.dispose @s_light.bitmap = nil end if @s_light_name != "" @s_light.bitmap = Cache.system(@s_light_name) @s_light.visible = true @s_light.ox = @s_light.bitmap.width / 2 @s_light.oy = @s_light.bitmap.height / 2 end Graphics.frame_reset end @s_light.opacity = $game_map.sl_opacity @s_light.blend_type = $game_map.sl_blend_type @s_light.x = $game_player.screen_x @s_light.y = $game_player.screen_y end #-------------------------------------------------------------------------- # 걳 긄귽깏귺긚 #-------------------------------------------------------------------------- alias create_parallax_str13 create_parallax def create_parallax create_parallax_str13 create_s_light end alias dispose_str13 dispose def dispose dispose_s_light dispose_str13 end alias update_str13 update def update update_str13 update_s_light end end