RPGXP 스크립트
2008.10.12 07:24

맵 이름을 화면 상단에 띄우기.

조회 수 2083 추천 수 1 댓글 1
Atachment
첨부 '1'
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
acoc_2_1194193709_01.jpg

맵에 도착하면 그 맵의 이름이 우측 상단에 떴다가 스르르 사라지게 하는 기능입니다.
(뜨는 네임은 작성된 맵 이름이 뜨기 때문에 맵 이름을 만들 때 굉장히 고심해야 할겁니다. 뭐 사실
막 지어도 되지만.ㅡ.ㅡ;; 막 지으면 이 스크립트를 적용한 보람이..후우..)


 


섹션 : Window_Map_Main (스크립트 맨 아래 Main 위에 마우스 오른버튼 찔러서 '삽입' 누르시면
삽입할 새로 세션을 만들 수 있습니다. 이름을 입력하고 아래 소스를 전부 넣어주시면 됩니다)


 


수정이 아니라 새로 만드는 것임을 주목해주세요. 게다가 위치도 Main 섹션 위에 넣어야 합니다.


 


소스는 전부 넣어주시면 됩니다.


 


내용중 "-"+text+"-", 라고 나오는 부분이 실제로 뜨게 하는 부분인데.


- 맵이름 - 으로 나옵니다. - 를 빼시려면 위에 내용을 text 라고만 써 넣으면 되겠죠.


 



#==============================================================================
# ■ Window_Map_Name
#------------------------------------------------------------------------------
#  맵명을 표시하는 윈도우입니다.
#==============================================================================
class Window_Map_Name < Window_Base
  #--------------------------------------------------------------------------
  # ● 오브젝트 초기
  #--------------------------------------------------------------------------
  def initialize
    super(460, 0, 180, 64)
    self.contents = Bitmap.new(width-32, height-32)
    @showing_time = 0
    @text_color   = Color.new(255,255,  0,255)      # 지명문자색
  end
  #--------------------------------------------------------------------------
  # ● 텍스트 설정
  # text : 윈도우에 표시하는 문자열
  # align : alignment (0..왼쪽 , 1..중앙 , 2..오른쪽)
  #--------------------------------------------------------------------------
  def set_text(text, align = 2)
    # 텍스트와 alignment의 적어도 한편이 전회와 다른 경우
    if text != @text or align != @align
      # 텍스트를 표기
      self.contents.clear
      @showing_time = 100
      @text = text
      @align = align
      @actor = nil
      self.contents_opacity = 255
      x = 4
      y = 0
      self.contents.font.color = Color.new(  0,  0,  0, 192)
      self.contents.draw_text(x+2, y+2, self.width - 40, 32, "-"+text+"-",align=1)
      self.contents.font.color = Color.new( 64, 64, 64, 192)
      self.contents.draw_text(x-1, y-1, self.width - 40, 32, "-"+text+"-", align=1)
      self.contents.draw_text(x+1, y-1, self.width - 40, 32, "-"+text+"-", align=1)
      self.contents.draw_text(x-1, y+1, self.width - 40, 32, "-"+text+"-", align=1)
      self.contents.draw_text(x+1, y+1, self.width - 40, 32, "-"+text+"-", align=1)
      self.contents.font.color = @text_color
      self.contents.draw_text(x, y, self.width - 40, 32, "-"+text+"-", align=1)
    else
      @showing_time -= 1


      if @showing_time < 16
        # 페이드아웃 하기 시작한다
        self.contents_opacity = @showing_time * 16
      elsif @showing_time <= 0
        # 일정시간을 보냈으므로 표시를 지운다
        self.contents.clear
      end
    end
    self.visible = true
  end
end
#==============================================================================
# ■ Scene_Map
#==============================================================================
class Scene_Map
  #--------------------------------------------------------------------------
  # ● 메인처리
  #--------------------------------------------------------------------------
  alias xrxs20_main main
  def main
    # 지명 윈도우를 작성
    @map_name_window = Window_Map_Name.new
    @map_name_window.opacity = 0
    # ?
    xrxs20_main
    # 지명 윈도우를 해방
    @map_name_window.dispose
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신
  #--------------------------------------------------------------------------
  alias xrxs20_update update
  def update
    # 지명 윈도우의 갱신
    @map_name_window.set_text($game_map.name,1)
    xrxs20_update
  end
end
#==============================================================================
# ■ Scene_Title
#==============================================================================
class Scene_Title
  #--------------------------------------------------------------------------
  # ● 메인처리
  #--------------------------------------------------------------------------
  alias xrxs20_main main
  def main
    $map_infos = load_data("Data/MapInfos.rxdata")
    for key in $map_infos.keys
      $map_infos[key] = $map_infos[key].name
    end
    xrxs20_main
  end
end
#==============================================================================
# ■ Game_Map
#==============================================================================
class Game_Map
  #--------------------------------------------------------------------------
  # ● 맵명을 취득
  #--------------------------------------------------------------------------
  def name
    $map_infos[@map_id]
  end
end

?
  • ?
    약간의소망 2011.04.10 04:58

    끄아아아아아아아악!


    왜 이렇게 프로그램이 사람의 머리를 아프게 하는거야!!!!!!!!!!


    ...


    어렵지만 유용하겠네요..


    제가 직접 다 써보고 싶지만..


    머리 아프고..


    만약 쓴다고 하면 복사 붙여넣기 할께요..


  1. [VX] 조건분기로 키입력의 처리 실행

    Date2008.11.28 CategoryRPGVX 스크립트 ByEvangelista Views2131 Votes1
    Read More
  2. 직업명 표시

    Date2010.10.24 CategoryRPGXP 스크립트 ByA.M.S Views2103 Votes0
    Read More
  3. 이벤트 이름 표시하기

    Date2016.04.05 CategoryRPGMV 플러그인 By러닝은빛 Views2098 Votes1
    Read More
  4. Keyboard Event - RPG Maker MV

    Date2017.01.03 CategoryRPGMV 플러그인 By러닝은빛 Views2085 Votes0
    Read More
  5. 대화창에 얼굴 띄우기& 대화창 명령어 모음.

    Date2008.12.31 CategoryRPGXP 스크립트 By창조도시 Views2083 Votes1
    Read More
  6. 맵 이름을 화면 상단에 띄우기.

    Date2008.10.12 CategoryRPGXP 스크립트 By창조도시 Views2083 Votes1
    Read More
  7. 액터선택지이벤트제작 간편화 스크립트

    Date2009.04.30 CategoryRPGVX 스크립트 ByEvangelista Views2078 Votes3
    Read More
  8. 픽쳐 터치 플러그인

    Date2016.04.17 CategoryRPGMV 플러그인 By양갱님 Views2059 Votes0
    Read More
  9. 모션 스크립트

    Date2013.12.06 CategoryRPGXP 스크립트 By 운 Views2057 Votes0
    Read More
  10. 상점에서 상세정보보여주기

    Date2010.10.24 CategoryRPGXP 스크립트 ByA.M.S Views2057 Votes0
    Read More
  11. 부드러운화면이동

    Date2010.10.24 CategoryRPGXP 스크립트 ByA.M.S Views2046 Votes0
    Read More
  12. 대각선 방향 이동추가로 8방향 이동 만들기.

    Date2008.08.14 CategoryRPGXP 스크립트 By창조도시 Views2043 Votes1
    Read More
  13. Kaus Ultimate Overlay v1.03 (강력레이아웃추가! 빛/포그/파노라마/맵)

    Date2015.11.08 CategoryRPGMV 플러그인 By파란별빛 Views2032 Votes0
    Read More
  14. 윈도우 시스템 트레이로 최소화

    Date2016.01.21 CategoryRPGMV 플러그인 By러닝은빛 Views2031 Votes0
    Read More
  15. 파이널 판타지 7 스타일 메뉴

    Date2013.10.01 CategoryRPGXP 스크립트 By Views2028 Votes0
    Read More
  16. [VX] 파티 선두 캐릭터 액터ID를 변수에 넣기

    Date2008.11.28 CategoryRPGVX 스크립트 ByEvangelista Views2014 Votes1
    Read More
  17. 타이틀 메뉴 위치 바꾸기 vx 및 vx ace

    Date2015.09.21 CategoryRPGVX Ace 스크립트 By여줄가리 Views2009 Votes0
    Read More
  18. 모바일 패드 플러그인입니다! MBS - Mobile DirPad & Action Button

    Date2015.11.07 CategoryRPGMV 플러그인 Bywillmv Views2007 Votes3
    Read More
  19. [ MV ] 심장[체력표시 하트] 플러그인

    Date2018.07.01 CategoryRPGMV 플러그인 By수성의물 Views1994 Votes0
    Read More
  20. [VX] 메시지 표시를 한번에 표시로 전환하기

    Date2008.11.28 CategoryRPGVX 스크립트 ByEvangelista Views1975 Votes1
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 15 Next
/ 15






[개인정보취급방침] | [이용약관] | [제휴문의] | [후원창구] | [인디사이드연혁]

Copyright © 1999 - 2016 INdiSide.com/(주)씨엘쓰리디 All Rights Reserved.
인디사이드 운영자 : 천무(이지선) | kernys(김원배) | 사신지(김병국)