VX 스크립트

맨님이 올려주신것 같은데 뭔가 이상해서

다른것 올립니당.....

#==============================================================================
#  Kill Autoshadows
#  Version: 2.0b
#  Author: modern algebra (rmrk.net) & Abt Plouton
#  Date: May 13, 2009
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Description:
#
#    This script allows you to disable or re-enable autoshadows at any time.
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#
#    Place this script above Main and below Materials.
#
#    To disable autoshadows, use this code in a call script:
#
#      $game_map.autoshadows = false
#
#    To enable them, use this code:
#
#      $game_map.autoshadows = true
#==============================================================================

#==============================================================================
# ** Game Map
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased method - setup
#    new writer instance variable - autoshadows
#    new method - autoshadows
#==============================================================================

class Game_Map
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Public Instance Variables
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  attr_writer :autoshadows
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Get Autoshadows
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def autoshadows
    return @autoshadows unless @autoshadows.nil?
    @autoshadows = false
    return false
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Setup
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias ma_remove_auto_shadows_on_setup setup
  def setup (map_id)
    ma_remove_auto_shadows_on_setup (map_id)
    # Rather than repeatedly call a method, set a local variable to have it's data
    ma_data = data
    return if autoshadows
    # For all squares on the map
    for x in 0...(ma_data.xsize - 1)
      for y in 0...(ma_data.ysize - 1)
        # If house autotile
        if ma_data[x, y, 0] >= 4352 && ma_data[x, y + 1 ,0] >= 4352 &&
             ma_data[x + 1, y + 1, 0] < 4352
          # Delete auto Shadow
          ma_data[x, y, 1] = ma_data[x,y,0]
          ma_data[x, y, 0] = 0
        end
      end
    end
  end
end

끝...ㅇㅅㅇ..

출처:rmrk

Comment '3'
  • ?
    오를리쉬 2010.04.20 00:24

    감사합니다. 이것때문에 맵이 훨씬 자연스러워 지겠군요~

  • ?
    노력쟁이 2010.05.16 20:59

    VX이용자는 아니지만, 주간 랭킹7위에 있길래 밨는데 꾀 유용할듯하네용.

     

    그림자 없애는거라...

     

    죽었을때 사용하면 될듯함 ㅋㅋ

  • ?
    나이트퓨리 2010.07.08 17:43

    잘쓰겠습니다~


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5404
457 타이틀/게임오버 Random Title Screen 2 Man... 2008.10.28 1454
456 폴스 세이브 4 Man... 2008.10.28 2343
455 Attribute System Man... 2008.10.28 1293
454 More SaveFlies(대박) 2 Man... 2008.10.28 2125
453 Khai's Window Helper 1.4 1 Man... 2008.10.28 1272
452 기타 RPG 2000이나 RPG 2003처럼 전체화면으로 나오게 하는 스크립트(대박) 21 Man... 2008.10.28 4821
451 타이틀/게임오버 New Title Screen 3 Man... 2008.10.28 1832
450 변수/스위치 Variable Criticals Man... 2008.10.28 1480
449 Detailed Call Script Error Mesage 3 Man... 2008.10.28 1258
448 기타 TagNote v2.0 5 Man... 2008.10.28 1996
447 베틀 스크린 톤 체인지?? 무슨 말? 4 Man... 2008.10.28 1616
446 디러그 시스템?? 1 Man... 2008.10.28 1247
445 새로운 종류의 세이브 스크립트!! 8 Man... 2008.10.28 3517
444 전투 오버 드라이브 프로블럼 2 Man... 2008.10.28 2268
443 영상 ??(Avi play ver beta 0.8) 4 Man... 2008.10.28 1575
442 맵/타일 GubiD's Isometric Maps for RPG Maker VX 1 Man... 2008.10.28 1681
441 Limit Break VX 3 Man... 2008.10.28 1777
440 Multi-threader snippet by Omegazion Man... 2008.10.28 1107
439 Enable Usage of Rmxp 캐릭터(?) 5 Man... 2008.10.28 2413
438 Screen Resolution 3 Man... 2008.10.28 1171
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 32 Next
/ 32