VX 스크립트



스크립트로 문장을 적으면 화면상에 픽쳐로서 표시가 됩니다
따라서 캐릭터가 이동하고 있는 중에도 문자가 표시된답니다.

위의 스크린샷에서 보이는것처럼 이벤트스크립트로 문장을 적어준다음에
그림의표시를 하시면됩니다.


#==============================================================================
# 걳RGSS2 
# STR27_빒럻긯긏?긿맯맟 v1.1 08/09/05
# 긖??긣갌http://strcatyou.u-abel.net/
#
# 갋럚믦궢궫빒럻쀱귩긯긏?긿?렑궠궧귏궥갃
#
# 걾럊뾭뺴?
#?댥돷궻긚긏깏긵긣귩귽긹깛긣긓?깛긤궳렳뛱궢궫뚣갂
#?긯긏?긿궻?렑"긓?깛긤궳빒럻긯긏?긿귩?렑궠궧귏궥갃
=begin
궞궞궔귞

# 긡긌긚긣
t = "hogehoge"
s = 20 # 빒럻긖귽긛
p = 0  # 긲긅깛긣긬??깛
text_picture(t, p, s)

궞궞귏궳
=end
#
# 겍긲긅깛긣긬??깛궼돷궻먠믦됒룋궳믦?궢귏궥갃
# 겍긲긅깛긣긖귽긛궕룷궠궥궗궫귟묈궖궥궗궫귟궥귡궴
# ?긄깋?궕궳귏궥갃뭾댰궢궲궘궬궠궋갃
#
#------------------------------------------------------------------------------
#
# 뛛륷뿗쀰
# 걻1.0겏1.1
#?""볙궻둂뛱됒룋궶궵궳쪈첈렑궠귢귡긫긐귩뢇맫
#
#==============================================================================
# 걳 긲긅깛긣긬??깛믦?(먠믦됒룋)
#==============================================================================
module STRRGSS2
  #              겓뫮돒궥귡뭠
                # 믅륂궻빒럻
  STR27_FLIST = {0 => ["UmePlus Gothic",      # 긲긅깛긣뼹
                       false,                 # 뫞럻
                       false,                 # 롈뫬
                       true,                  # 뎓빒럻
                       false,                 # 뎼롦귟
                       Color.new(255,255,255),# 빒럻륡
                       Color.new( 64, 32,128) # 뎼롦귟륡
                       ],
                # 롈귕갋뎼롦귟
                 1 => ["UmePlus Gothic",      # 긲긅깛긣뼹
                       false,                 # 뫞럻
                       true,                  # 롈뫬
                       true,                  # 뎓빒럻
                       true,                  # 뎼롦귟
                       Color.new(255,255,255),# 빒럻륡
                       Color.new( 64, 32,128) # 뎼롦귟륡
                       ],
                 }
#
end
#==============================================================================
# 걾 Game_Interpreter
#==============================================================================
class Game_Interpreter
  #--------------------------------------------------------------------------
  # 걶 빒럻긯긏?긿럚믦
  #--------------------------------------------------------------------------
  def text_picture(text, p = 0, size = 20)
    strfp = STRRGSS2::STR27_FLIST[p]
    font = Font.new(strfp[0], size)
    font.bold = strfp[1] ; font.italic = strfp[2]
    font.shadow = strfp[3] ; font.color = strfp[5]
    text.gsub!(/[tnrf]*/,"")
    @strtxpic = [text, STR_DumpFont.new(font, strfp[4], strfp[6])]
  end
  #--------------------------------------------------------------------------
  # 걶 긯긏?긿궻?렑(긄귽깏귺긚)
  #--------------------------------------------------------------------------
  alias command_231_str27 command_231
  def command_231
    @params[1] = @strtxpic if @strtxpic != nil ; @strtxpic = nil
    command_231_str27
  end
end
#==============================================================================
# 걾 Sprite_Picture
#==============================================================================
class Sprite_Picture < Sprite
  #--------------------------------------------------------------------------
  # 걶 긲깒??뛛륷(긄귽깏귺긚)
  #--------------------------------------------------------------------------
  alias update_str27 update
  def update
    if @picture.name.is_a?(Array) and @picture_name != @picture.name 
      # 빒럻긯긏?긿
      @picture_name = @picture.name
      if @picture_name != ""
        self.bitmap.dispose if self.bitmap != nil and not @picture_name.is_a?(String)
        f = @picture_name[1].undump
        # 빒럻긖귽긛롦벦
        self.bitmap =Bitmap.new(1, 1) ; self.bitmap.font = f[0]
        size = self.bitmap.text_size(@picture_name[0])
        size.width += f[0].size / 4 if f[0].italic
        size.width += 4 ; self.bitmap.dispose
        # 귽긽?긙띿맟
        self.bitmap = Bitmap.new(size.width + 2, size.height + 2) ; self.bitmap.font = f[0]
        unless f[1]
          self.bitmap.draw_text(1, 1, size.width, size.height, @picture_name[0])
        else
          self.bitmap.draw_text_f(1, 1, size.width, size.height, @picture_name[0], 0, f[2])
        end
      end
    elsif @picture_name != @picture.name
      # 믅륂긯긏?긿
      @picture_name = @picture.name
      if @picture_name != ""
        self.bitmap.dispose unless @picture_name.is_a?(String)
        self.bitmap = Cache.picture(@picture_name)
      end
    end
    # 뚁귂뽣궢
    update_str27
  end
end
#==============================================================================
# 걾 Bitmap
#==============================================================================
class Bitmap
  #--------------------------------------------------------------------------
  # 걶 빒럻뎼롦귟?됪
  #--------------------------------------------------------------------------
  def draw_text_f(x, y, width, height, str, align = 0, color = Color.new(64,32,128))
    shadow = self.font.shadow
    b_color = self.font.color.dup
    font.shadow = false
    font.color = color
    draw_text(x + 1, y, width, height, str, align) 
    draw_text(x - 1, y, width, height, str, align) 
    draw_text(x, y + 1, width, height, str, align) 
    draw_text(x, y - 1, width, height, str, align) 
    font.color = b_color
    draw_text(x, y, width, height, str, align)
    font.shadow = shadow
  end
  def draw_text_f_rect(r, str, align = 0, color = Color.new(64,32,128)) 
    draw_text_f(r.x, r.y, r.width, r.height, str, align = 0, color) 
  end
end
#==============================================================================
# 걾 STR_DumpFont
#==============================================================================
class STR_DumpFont
  #--------------------------------------------------------------------------
  # 걶 룊딖돸
  #--------------------------------------------------------------------------
  def initialize(font, edge, ed_color)
    @name = font.name ; @size = font.size
    @bold = font.bold ; @italic = font.italic
    @shadow = font.shadow ; @edge = edge ; @ed_color = ed_color.clone
    @color = Color.new(font.color.red,font.color.green,font.color.blue,font.color.alpha)
  end
  #--------------------------------------------------------------------------
  # 걶 빾듂
  #--------------------------------------------------------------------------
  def undump
    font = Font.new(@name, @size)
    font.bold = @bold ; font.italic = @italic
    font.shadow = @shadow ; font.color = @color
    return [font, @edge, @ed_color]
  end
end

Who's 좀비사냥꾼

?

 

 

Comment '7'
  • ?
    개소주 2009.03.21 22:56
    필요도 했었고 다좋은데... 사용법좀요... 스크립트에 넣고 어느부분에 나오게할 말을 쓰고 또 나오게 할때 고급스크립트에 머라고 작성하나요
  • ?
    좀비사냥꾼 2009.03.22 16:19
    스크린샷보면 어떻게 쓰는지 이해하실텐데... -_-;; 스크립트에 대해 잘모르시나보군요.
    사용법을 알려드리겠습니다.

    이벤트스크립트에

    t = "hogehoge"
    s = 20 # 문자사이즈
    p = 0  # 폰트색깔
    text_picture(t, p, s)

    라고 적어주세요. 저기서 t=" " 안에는 문자를 적는겁니다. 예를 들어서 hogehoge가 화면에 뜨는겁니다
    그리고 s=" " 안에는 글자크기를 적어줍니다.
    그리고 p= 에는 0또는 1을 적어주시면 되는데요. 0을 적어주시면 글자가 하얀색, 1을 적으면 파란색글자가 뜹니다.
    이벤트스크립트를 적었다면 이제 그림의표시를 하세요.
    그림의표시에서 그림번호는 1번입니다.
    예를들어서 이벤트스크립트를 2개만들었다면 그림번호 2번도 해주셔야겠죠.
  • ?
    비울 2009.11.29 08:22

    안 되는데요? 에러떠요. 예제 좀 올려주시지...

  • ?
    테일러급수 2010.01.01 08:35

    오오 잘써보겠습니다~

  • ?
    아하!잘봤어요. 2010.01.02 20:32

    에러예요

  • ?
    봉시기 2010.07.30 03:05

    수정됫네요!! 잘쓸께요

  • profile
    라구나 2010.11.20 15:49

    충돌은아닌거같운데,에러가 나네요..


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5398
29 메시지 Advanced Text System 3.0b by Modern Algebra 3 file Alkaid 2010.09.05 2206
28 메시지 Advanced Text System 3.0c by Modern Algebra 3 file Alkaid 2010.09.08 2302
27 메시지 Display Flipped Picture 스크립트 11 Love♡ 2009.11.09 3585
26 메시지 Etude87 Dialogue History Scene file 습작 2014.07.07 1069
25 메시지 Etude87_Item_Choice ver.1.00 file 습작 2013.02.16 1771
24 메시지 HG_POP_TEXT (맵 화면에 문자 표시) 4 file 허걱 2011.09.16 3589
23 메시지 MessageSound v2.0 글자에 소리 다다닥 스크립트 21 할렘 2009.02.02 3510
22 메시지 MultiMessage 멀티 메시지 스크립트 9 file 허걱 2010.02.23 4297
21 메시지 NMS 3.0 Beta 주석 번역본(한글) 4 인천항 2010.01.13 3369
20 메시지 Quick Face Border 12 아방스 2008.03.05 4161
19 메시지 Universal Message System 0.3.0(beta) by ccoa 3 file Alkaid 2010.09.08 2304
18 메시지 [완성]RPG Maker VX용 한글 조사 자동결정 10 file 시릴캣 2009.08.13 4598
17 메시지 넘버님의로딩수정101번눌르긴그레서..... 7 file 알피지vx초짜 2010.01.22 2394
16 메시지 네오 메시지 시스템 최신 17 file RPGbooster 2008.10.08 4251
15 메시지 대화창효과 8 078656577er 2009.10.20 5972
14 메시지 메시지 오른쪽 정렬되어 나오는 스크립트 3 file 아방스 2009.07.12 3237
13 메시지 메시지 표시 시스템 [NMS3] 31 아방스 2009.01.24 6248
12 메시지 메시지를 빠르게 넘겨주는 스크립트 3 타카나시 소라 2012.07.23 5038
» 메시지 문자픽쳐 표시 스크립트 7 file 좀비사냥꾼 2009.03.19 4144
10 메시지 문장 넘길대 소리나게 하는스크립트 19 아방스 2008.01.24 4180
Board Pagination Prev 1 2 Next
/ 2