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. 최초 시작화면에 제작자 정보를 띄워보자.

    Date2008.04.04 CategoryRPGXP 스크립트 By창조도시 Views1961 Votes5
    Read More
  2. 최초 시작화면에 제작자 정보를 띄워보자.

    Date2008.04.04 CategoryRPGXP 스크립트 By창조도시 Views2530 Votes5
    Read More
  3. 기차 파티 스크립트

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

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

    Date2008.07.24 CategoryRPGXP 스크립트 By창조도시 Views2208 Votes3
    Read More
  6. 기차 파티 스크립트

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

    Date2008.08.14 CategoryRPGXP 스크립트 By창조도시 Views2200 Votes1
    Read More
  8. 대각선 방향 이동추가로 8방향 이동 만들기.

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

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

    Date2008.10.12 CategoryRPGXP 스크립트 By창조도시 Views2732 Votes1
    Read More
  11. [VX] 파티 선두 캐릭터 액터ID를 변수에 넣기

    Date2008.11.28 CategoryRPGVX 스크립트 ByEvangelista Views1710 Votes1
    Read More
  12. [VX] 조건분기로 키입력의 처리 실행

    Date2008.11.28 CategoryRPGVX 스크립트 ByEvangelista Views1734 Votes1
    Read More
  13. [VX] 메시지 표시를 한번에 표시로 전환하기

    Date2008.11.28 CategoryRPGVX 스크립트 ByEvangelista Views1975 Votes1
    Read More
  14. [VX] 파티 선두 캐릭터 액터ID를 변수에 넣기

    Date2008.11.28 CategoryRPGVX 스크립트 ByEvangelista Views2012 Votes1
    Read More
  15. [VX] 조건분기로 키입력의 처리 실행

    Date2008.11.28 CategoryRPGVX 스크립트 ByEvangelista Views2129 Votes1
    Read More
  16. [VX] 메시지 표시를 한번에 표시로 전환하기

    Date2008.11.28 CategoryRPGVX 스크립트 ByEvangelista Views2384 Votes1
    Read More
  17. 대화창에 얼굴 띄우기& 대화창 명령어 모음.

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

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

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

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