RPGXP 스크립트
2008.10.12 07:24

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

조회 수 2735 추천 수 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 전용 오토세이브<자동저장>

    Date2011.08.31 CategoryRPGVX 스크립트 By고진수 Views2800 Votes0
    Read More
  2. vx 한글이름입력

    Date2010.05.21 CategoryRPGVX 스크립트 By가가상 Views2771 Votes1
    Read More
  3. 부활 스크립트

    Date2013.10.01 CategoryRPGXP 스크립트 By Views2766 Votes0
    Read More
  4. 이름조합스크립트

    Date2013.10.27 CategoryRPGXP 스크립트 ByScissor Views2764 Votes0
    Read More
  5. 그레고리우스력 원리.

    Date2011.06.22 CategoryRPGXP 스크립트 By협객 Views2752 Votes0
    Read More
  6. 맵 이름을 화면 상단에 띄우기.

    Date2008.10.12 CategoryRPGXP 스크립트 By창조도시 Views2735 Votes1
    Read More
  7. vx 전용 오토세이브<자동저장>

    Date2011.08.31 CategoryRPGVX 스크립트 By고진수 Views2729 Votes0
    Read More
  8. 아이템 조합 스크립트

    Date2013.12.06 CategoryRPGXP 스크립트 By 운 Views2712 Votes0
    Read More
  9. 이벤트 자동 추적 플러그인

    Date2016.04.27 CategoryRPGMV 플러그인 By러닝은빛 Views2709 Votes3
    Read More
  10. 한글이름입력기 v1.76

    Date2008.07.24 CategoryRPGXP 스크립트 By창조도시 Views2698 Votes2
    Read More
  11. VX Ace 스크립트 사이트

    Date2014.08.07 CategoryRPGVX Ace 스크립트 By제피 Views2676 Votes0
    Read More
  12. 이벤트커맨드 스크립트 관련 설명

    Date2009.01.29 CategoryRPGVX 스크립트 ByEvangelista Views2655 Votes3
    Read More
  13. Window_Message_Plus v3.2

    Date2009.11.29 CategoryRPGVX 스크립트 By에존 Views2647 Votes1
    Read More
  14. 이벤트커맨드 스크립트 사용법 모음

    Date2009.07.21 CategoryRPGVX 스크립트 ByEvangelista Views2645 Votes2
    Read More
  15. [무한응용]스위치/변수 임시 저장/로딩하기

    Date2010.04.10 CategoryRPGXP 스크립트 By카리스 Views2633 Votes1
    Read More
  16. 퀘스트스크립트

    Date2010.10.24 CategoryRPGXP 스크립트 ByA.M.S Views2633 Votes1
    Read More
  17. 1인용메뉴

    Date2010.07.18 CategoryRPGVX Ace 스크립트 ByA.M.S Views2609 Votes0
    Read More
  18. 새로운 게임 시작/로드 시 미묘한 연출 추가.

    Date2007.12.01 CategoryRPGXP 스크립트 By창조도시 Views2604 Votes1
    Read More
  19. [무한응용]스위치/변수 임시 저장/로딩하기

    Date2010.04.10 CategoryRPGXP 스크립트 By카리스 Views2594 Votes1
    Read More
  20. 이벤트커맨드 스크립트 조건분기법 모음

    Date2009.11.18 CategoryRPGVX 스크립트 ByEvangelista Views2590 Votes2
    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(김원배) | 사신지(김병국)