RPGXP 스크립트
2008.10.12 07:24

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

조회 수 2732 추천 수 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. 스텟포인트투자

    Date2010.10.24 CategoryRPGXP 스크립트 ByA.M.S Views2142 Votes2
    Read More
  2. 특정범위내에들어오면이동하기

    Date2010.10.14 CategoryRPGXP 스크립트 ByA.M.S Views3082 Votes0
    Read More
  3. 아이템획득 표시

    Date2010.10.14 CategoryRPGXP 스크립트 ByA.M.S Views2276 Votes0
    Read More
  4. UNR (아시려나... ) - 상태 이상

    Date2013.01.20 CategoryRPGXP 스크립트 By동동주 Views936 Votes0
    Read More
  5. 새로운 게임 시작/로드 시 미묘한 연출 추가.

    Date2007.12.01 CategoryRPGXP 스크립트 By창조도시 Views2604 Votes1
    Read More
  6. 대화 글씨 폰트를 원하는 폰트로 바꾸기

    Date2007.12.01 CategoryRPGXP 스크립트 By창조도시 Views1811 Votes2
    Read More
  7. 대각선 방향 이동추가로 8방향 이동 만들기.

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

    Date2008.10.12 CategoryRPGXP 스크립트 By창조도시 Views2732 Votes1
    Read More
  9. 최초 시작화면에 제작자 정보를 띄워보자.

    Date2008.04.04 CategoryRPGXP 스크립트 By창조도시 Views2530 Votes5
    Read More
  10. 선택 메뉴를 가운데 정렬 해보자.

    Date2007.12.02 CategoryRPGXP 스크립트 By창조도시 Views1955 Votes2
    Read More
  11. 아이템창을 아이템 분류별로 나누어 지게 개조.

    Date2007.12.02 CategoryRPGXP 스크립트 By창조도시 Views2148 Votes1
    Read More
  12. c[n] 명령어 줄때의 색상 결정.

    Date2008.02.14 CategoryRPGXP 스크립트 By창조도시 Views1438 Votes1
    Read More
  13. 대화창에 얼굴 띄우기& 대화창 명령어 모음.

    Date2008.12.31 CategoryRPGXP 스크립트 By창조도시 Views2820 Votes1
    Read More
  14. 게임도중에 글씨체를 바꿔보자.

    Date2008.12.31 CategoryRPGXP 스크립트 By창조도시 Views1652 Votes1
    Read More
  15. 대화창에 이름&얼굴 띄우기 새로운방식.

    Date2007.11.06 CategoryRPGXP 스크립트 By창조도시 Views3594 Votes3
    Read More
  16. 그림자문자 사용하기.. 바탕색이 무슨색이건 상관없이 글자가 잘보인다!!!

    Date2007.11.06 CategoryRPGXP 스크립트 By창조도시 Views1888 Votes1
    Read More
  17. 기차 파티 스크립트

    Date2008.07.24 CategoryRPGXP 스크립트 By창조도시 Views1879 Votes2
    Read More
  18. 한글이름입력기 v1.76

    Date2008.07.24 CategoryRPGXP 스크립트 By창조도시 Views2208 Votes3
    Read More
  19. 창고 시스템

    Date2008.01.18 CategoryRPGXP 스크립트 By창조도시 Views2168 Votes3
    Read More
  20. 물가에가면 캐릭터를 반사시켜주는 스크립트

    Date2007.12.02 CategoryRPGXP 스크립트 By창조도시 Views4994 Votes7
    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(김원배) | 사신지(김병국)