RPGXP 스크립트
2008.10.12 07:24

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

조회 수 2743 추천 수 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. 문과 상자를 쉽게 만들수 있는 스크립트

    Date2013.10.21 CategoryRPGXP 스크립트 By Views2244 Votes0
    Read More
  2. 몬스터 도감

    Date2013.09.24 CategoryRPGXP 스크립트 By청담 Views1426 Votes0
    Read More
  3. 모션 스크립트

    Date2013.12.06 CategoryRPGXP 스크립트 By 운 Views2057 Votes0
    Read More
  4. 모바일 패드 플러그인입니다! MBS - Mobile DirPad & Action Button

    Date2015.11.07 CategoryRPGMV 플러그인 Bywillmv Views2007 Votes3
    Read More
  5. 모든 글자에 외곽선을 넣어주는 스크립트

    Date2013.09.26 CategoryRPGXP 스크립트 By Views808 Votes1
    Read More
  6. 모든 글자에 외곽선 넣는 스크립트

    Date2013.09.20 CategoryRPGXP 스크립트 By청담 Views1186 Votes0
    Read More
  7. 메세지에 얼굴, 이름등 다양한 기능 넣기 UMS 스크립트

    Date2013.12.10 CategoryRPGXP 스크립트 By데노제 Views1618 Votes0
    Read More
  8. 메뉴에서 실제시간 보는 스크립트

    Date2013.09.24 CategoryRPGXP 스크립트 By청담 Views607 Votes0
    Read More
  9. 메뉴에 퀘스트 있는거

    Date2013.10.12 CategoryRPGXP 스크립트 By 운 Views1960 Votes2
    Read More
  10. 메뉴에 얼굴 그래픽 표시

    Date2013.09.24 CategoryRPGXP 스크립트 By청담 Views833 Votes0
    Read More
  11. 메뉴 스크립트 Zer0 CMS

    Date2013.10.01 CategoryRPGXP 스크립트 By Views1384 Votes0
    Read More
  12. 맵타일 크기 변경 플러그인!

    Date2015.10.26 CategoryRPGMV 플러그인 By파란별빛 Views1410 Votes0
    Read More
  13. 맵이름 표시 스크립트

    Date2013.10.05 CategoryRPGXP 스크립트 By 운 Views2246 Votes0
    Read More
  14. 맵상에서 캐릭터 스프라이트 이미지를 offset해주는 플러그인

    Date2016.07.19 CategoryRPGMV 플러그인 Bylklslel Views1075 Votes0
    Read More
  15. 맵 이름을 화면 상단에 띄우기.

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

    Date2008.10.12 CategoryRPGXP 스크립트 By창조도시 Views2743 Votes1
    Read More
  17. 맵 이름 표시 스크립트

    Date2013.09.20 CategoryRPGXP 스크립트 By청담 Views1440 Votes0
    Read More
  18. 맵 이동시 로딩 그림 표시 스크립트

    Date2013.09.24 CategoryRPGXP 스크립트 By청담 Views718 Votes0
    Read More
  19. 말풍선 메세지 스크립트

    Date2014.02.24 CategoryRPGXP 스크립트 By천둥번들 Views1855 Votes0
    Read More
  20. 로고를 띄우는 스크립트

    Date2013.10.07 CategoryRPGXP 스크립트 ByXEONSOFT블로그 Views1681 Votes0
    Read More
Board Pagination Prev 1 ... 3 4 5 6 7 8 9 10 11 12 ... 15 Next
/ 15






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

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