질문과 답변

Extra Form

문제는 :

텍스트 팝업 스크립트인데 화면 색조를 어둡게하면 안보여요....


이벤트에서 '화면의 색조변경'을 (0, 0, 0, 0)으로 해두고서,

'팝업 스크립트'를 사용하면 보이지가 않습니다.


보니깐 화면의 색조를 변경하면 팝업 텍스트도 같이 어두워 지더라고요...

절대 스크립트를 잘못 사용해서 오류가 뜨는게 아니에요...


그래서 화면의 색조보다 팝업 텍스트를 위에 보이게 하고 싶은데 방법이 없을까요?

스크립트는 할줄을 몰라서 이렇게 부탁드립니다...


스크립트 파일 첨부하였고요. 사용법도 스크립트에 있는데,

사용하시는 방법은 이벤트 스크립트에 아래 것을 넣으시면 됩니다...


nel_textpop(
:text => "텍스트",
:event_id => -1,
:bold => true,
:time => 240,
:size => 24,
:color => Color.new(255,255,255),
)


스크립트 고수님들 꼭 좀 부탁드리겠습니다..

Comment '4'
  • profile
    습작 2013.11.24 16:39

    캐릭터 스프라이트를 그리는 뷰포트보다 상위의 뷰포트에 텍스를 그리도록 수정했습니다. 수고하세요.^^



    =begin


    폰트,크기,색,위치까지 설정 가능한 만능 글짜띄우기 스크립트입니다.


    액알이나 기타 시뮬에 도움이 많이 될 것 같네요 ㅎㅎ


     


    http://forums.rpgmakerweb.com/index.php?/topic/576-nasty-text-pop-over-events/<원본링크


     


    스크립트 사용법 예제:


    nel_textpop(

    :text => "사용하는방법",

    :event_id => -1,

    :bold => true,

    :time => 240,

    :size => 24,

    :color => Color.new(255,255,255),

    )


    =end 


    #===============================================================================

    #       N.A.S.T.Y. Text Pop Over Events

    #      Nelderson's Awesome Scripts To You

    #

    # By: Nelderson

    # Last Updated: 3/18/20112

    #

    # Version 1.0 - 3/17/2012

    #

    #===============================================================================

    #

    # Update History:

    # - Version 1.0  - Initial release, 1st Resource Script for rpgmakervxace.net

    #===============================================================================

    # *Features:

    # - This script creates text above an event or the player on a map

    #  

    # *Initial Setup

    # - This script has a small setup section to define a few Defaults when

    #   text is first put up above an event's head:

    #  

    # DEF_TEXT_COLOR - Is the default text color when not defined in the

    #      script call. When you pick a color you have to use

    #      the form:

    #

    #    Color.new(r,g,b,a) - Where r = red, g = green,

    #          b = blue, and a = alpha

    #

    # DEF_TEXT_SIZE - This is the default text font size, pretty easy here.

    #

    # DEF_TEXT_FONT - This is the name of the default font that'll be used

    #     for text pops that don't specify one in the script call

    #

    # *Script Call:

    #

    # - nel_textpop(:attribute => value,

    #      :attribute2 => value,

    #      :attribute3: => value,

    #      )

    #

    #   ** Where :attributes can be any one of the following:

    #

    #    :text => Values will be in "quotes", and displays over event

    #     (Defaults to "" when not defined)

    #  

    #    :event_id => The Event ID that will display text.

    #     0 = Current Event ID,  -1 = Player,

    #       -2 1stFollower, -3 2ndFollower, -4 3rdFollower

    #     (Defaults to 0 when not defined)

    #

    #    :time => This is the time that the text will last in FRAMES.

    #     60 FRAMES = 1 second,

    #     *Note: Set :time => nil for the text to last forever*

    #     (Defaults to nil when not defined)

    #    

    #    :font => This is the name of the font you want for the text.

    #     Values with be in "quotes"

    #     (Defaults to DEF_TEXT_FONT when not defined)

    #

    #    :size => This changes the font size on the text displayed

    #      (Defaults to DEF_TEXT_SIZE when not defined)

    #

    #    :color => This changes the color of the text displayed

    #     Values need to be => Color.new(r,g,b,a)

    #    (Defaults to DEF_TEXT_COLOR when not defined)

    #

    #    :bold => This makes the displayed text bold

    #       Values need to be => true or false

    #    (Defaults to false when not defined)

    #   

    #    :italic => This makes the displayed text italic

    #     Values need to be => true or false

    #    (Defaults to false when not defined)

    #

    # *Instructions

    #  -You can place the script call nel_textpop in any event

    #

    #  -You don't have to define every attribute, they will automatically

    #   go to the defaults to make things easier.

    #

    # *Sample Call

    #   nel_textpop(

    #   :text => "I hate you!",

    #   :event_id => -1,

    #   :bold => true,

    #   :italic => true,

    #   :time => 120,

    #   :font => "Vrinda",

    #   :size => 64,

    #   :color => Color.new(220,20,60),

    #   )

    #

    #===============================================================================

    # Credits:

    # -Nelderson, tomoaky, and IceDragon

    #===============================================================================

    # Based off: RGSS2_namepop Ver0.02

    # tomoaky (http://hikimoki.sakura.ne.jp/)

    #===============================================================================


    module NEL

      #Default text pop font

      DEF_TEXT_FONT = "나눔고딕"


      #Default text pop font size

      DEF_TEXT_SIZE = 16


      #Default text pop color

      DEF_TEXT_COLOR = Color.new(255,255,255,255)# <== White


    end #<=== Don't Touch


    #========#======================#====#================================#========#

    #--------#       #----# DO NOT EDIT PAST THIS POINT!!! #--------#

    #--------# End of Customization #----# Editing will cause death by #--------#

    #--------#       #----# Zetu Stabbing your heart </3   #--------#

    #========#======================#====#================================#========#


    # // 02/03/2012 [

    #Collects the hash keys in order, and then passes the values

    class Hash

    # // IceDragon <=== *The Ultimate in Awesome OTL

      def get_values(*args)

     args.collect {|a|self[a]}

      end

    end  

    # // 02/03/2012 ]


    class Game_Interpreter

      include NEL

      #IceDragon helped make this script call easier with awesomeness...Thanks Icy!

      def nel_textpop(*args)

     if(args[0].is_a?(Hash))

       text, ev_id, time, size, color, font, bold, ital = args[0].get_values(:text,:event_id,:time,:size,:color,:font,:bold,:italic)

     else

       text, ev_id, time, size, color, font, bold, ital = *args

     end

     char = nel_get_character(ev_id || 0)

     return unless(char)

     char.namepop_size = size  || DEF_TEXT_SIZE

     char.namepop_color= color || DEF_TEXT_COLOR

     char.namepop_time = time  || nil

     char.namepop   = text  || ""

     char.namepop_font = font || DEF_TEXT_FONT

     char.namepop_bold = !!bold # // Convert to Bool

     char.namepop_ital = !!ital

     char.textpop_flag = true #Forces refresh

      end


      #--------------------------------------------------------------------------

      # *New Method: nel_get_character

      #

      # Instead of original get_character, this include Followers in the argument

      #--------------------------------------------------------------------------

      def nel_get_character(param)


     if $game_party.in_battle

       nil

     elsif param < 0

       case param

       when -1; return $game_player

       else; return $game_player.followers[(param + 2) * (-1)]

       end

     else

       events = same_map? ? $game_map.events : {}

       events[param > 0 ? param : @event_id]

     end

      end

      #--------------------------------------------------------------------------

    end

    #==============================================================================

    # ¡ Game_Character

    #==============================================================================

    class Game_Character

      #--------------------------------------------------------------------------

      # œ œo?J?C?“?X?^?“?X?I”

      #--------------------------------------------------------------------------

      attr_accessor :namepop    

      attr_accessor :namepop_size

      attr_accessor :namepop_color

      attr_accessor :namepop_time

      attr_accessor :namepop_font

      attr_accessor :namepop_bold

      attr_accessor :namepop_ital

      attr_accessor :textpop_flag #Instant update if script call is used


      #--------------------------------------------------------------------------

      alias nel_font_type_init initialize

      def initialize

     @namepop_font = NEL::DEF_TEXT_FONT

     @namepop_bold = false

     @namepop_ital = false

     @textpop_flag = false

     nel_font_type_init

      end

    end

    #==============================================================================

    # ¡ Sprite_Character

    #==============================================================================

    class Sprite_Character < Sprite_Base

      def initialize(viewport, character = nil, viewport2)

        super(viewport)

        @timer = 0

        @viewport2 = viewport2

        @character = character

        @balloon_duration = 0

        update

      end

      #--------------------------------------------------------------------------

      # œ ‰ð?u

      #--------------------------------------------------------------------------

      alias tnpop_sprite_character_dispose dispose

      def dispose

     dispose_namepop

     tnpop_sprite_character_dispose

      end

      #--------------------------------------------------------------------------

      # œ ?t?œ[?€XV

      #--------------------------------------------------------------------------

      alias tnpop_sprite_character_update update

      def update

     tnpop_sprite_character_update #Original Update

     if @timer > 0 && @character.textpop_flag == false#Skip when script called

       @timer -= 1

       update_text_pos

       if @timer <= 0

      @namepop_sprite.visible = false

      @namepop_sprite.opacity = 255 #Reset opacity just in case

      @namepop_sprite = nil

      @character.namepop = nil

      @namepop = nil

      @tmer_rat = nil #Reset ratio, just to avoid issues

       elsif @timer < 60

      #Fade out text gradually within the last 60 frames

      @tmer_rat ||= 255/@timer

      @namepop_sprite.opacity -= @tmer_rat

       end

     else

       update_namepop

       if @character.textpop_flag == true #If script call

      @namepop = @character.namepop

      start_namepop

       end

     end

      end


      def update_text_pos

     @namepop_sprite.x = x

     @namepop_sprite.y = y - height

     @namepop_sprite.z = z + 200

      end


      #--------------------------------------------------------------------------

      # ? namepop?I?J?n

      #--------------------------------------------------------------------------

      def start_namepop

        dispose_namepop

        return if @namepop == "none" or @namepop == nil

        @namepop_sprite = ::Sprite.new(@viewport2)

        b_width = @namepop.size * 16

        b_height = @character.namepop_size

        @namepop_sprite.ox = 80 + (b_width/2)

        @namepop_sprite.oy = 16 + (b_height/2)

        @namepop_sprite.bitmap = Bitmap.new(b_width+160, b_height)

        @namepop_sprite.bitmap.font.color = @character.namepop_color

        @namepop_sprite.bitmap.font.size = @character.namepop_size

        @namepop_sprite.bitmap.font.name = [@character.namepop_font]

        @namepop_sprite.bitmap.font.bold = @character.namepop_bold

        @namepop_sprite.bitmap.font.italic = @character.namepop_ital

        @namepop_sprite.bitmap.draw_text(0, 0, b_width+160, b_height, @namepop, 1)

        @namepop_time = @character.namepop_time

        update_namepop(@namepop_time)

        @character.textpop_flag = false

      end

      #--------------------------------------------------------------------------

      # ? namepop?IXV

      #--------------------------------------------------------------------------

      def update_namepop(time = nil) #Add a timer variable

        if @namepop_sprite != nil

          @namepop_sprite.x = x

          @namepop_sprite.y = y - height

          @namepop_sprite.z = z + 200

          if time != nil

            @timer = time

            @namepop_time = 0

          end

        end

      end

      #--------------------------------------------------------------------------

      # ? namepop?I‰ð?u

      #--------------------------------------------------------------------------

      def dispose_namepop

        if @namepop_sprite != nil

          @namepop_sprite.bitmap.dispose

          @namepop_sprite.dispose

          @namepop_sprite = nil

        end

      end

    end

    class Spriteset_Map

      def create_characters

        @character_sprites = []

        $game_map.events.values.each do |event|

          @character_sprites.push(Sprite_Character.new(@viewport1, event, @viewport3))

        end

        $game_map.vehicles.each do |vehicle|

          @character_sprites.push(Sprite_Character.new(@viewport1, vehicle, @viewport3))

        end

        $game_player.followers.reverse_each do |follower|

          @character_sprites.push(Sprite_Character.new(@viewport1, follower, @viewport3))

        end

        @character_sprites.push(Sprite_Character.new(@viewport1, $game_player, @viewport3))

        @map_id = $game_map.map_id

      end

    end


  • profile
    수이스 2013.11.24 16:47

    정말 마른땅에 단비같은 존재시네요 ㅠㅠ


    그런데 안되요 ㅠㅠ
    실행해보면
    Script 'Text_Pop_Over_Event' line 680: ArgumentError occurred.
    wrong number of arguments (3 for 2)
    라고 뜨네요 ㅠㅠ

  • profile
    습작 2013.11.24 16:55
    일단 빈 프로젝트에서 무리 없이 작동한 것으로보아 스크립트 자체의 문제라기 보다는 다른 스크립트와의 충돌문제인 것 같습니다. 사용하고 계시는 여타 다른 스크립트와의 충돌이 있지 않은지 확인해주세요.
  • profile
    수이스 2013.11.24 17:08
    아... 다른 스크립트랑 충돌하던 거더군요 ㅠㅠ
    필요없는 스크립트랑 충돌난거라 천만다행이네요 ㅎㅎ

    정말 감사합니다 ㅋㅋㅋ 무궁무진한 게임 제작할거같습니다

List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 12458
스크립트 작성 RMVXA 특정 위치 위에 있을 때 방향키나 기타 특정 키를 입력받았을때 정해진 기능이 실행되게 하려고 합니다. 1 무명유실 2019.12.09 68
스크립트 작성 RMMV [mv] 조건분기-> 버튼입력-> esc입력시, 마우스 우클릭 질문드립니다. 비형 2019.05.16 92
스크립트 작성 RMMV [mv] 능력치 + -, 스크립트의 어디를 건들여야 할까요? 2 비형 2019.05.16 121
스크립트 작성 기타 궁금한점1가지 1 김정은죽이기게임개발자! 2019.05.16 75
스크립트 작성 RMXP RTAB 스킬 준비 애니메이션 file Ringccubus 2019.05.17 54
스크립트 작성 RMXP 피격시 배틀러 그래픽이 변하는 스크립트 GAME중독 2019.05.23 96
스크립트 작성 RMVXA 오류 메세지 창 띄우기 2 file 핏치문 2019.05.29 236
스크립트 작성 RMVXA 저장 스크린이 열릴 때에만 커서 효과음이 바뀌게 하는 법 슈필러 2019.07.07 58
스크립트 작성 RMXP 특정 파일을 만드는 스크립트를 어떻게 제작하나요+특정 파일을 인식하는 스크립트는 어떻게 적용해야 하나요 2 인사 2019.07.22 145
스크립트 작성 RMVXA 스플래시 이미지를 매번 바뀌게 하고 싶습니다. 2 objuan 2019.07.29 203
스크립트 작성 기타 유니티 포톤 에셋으로 1인칭 생존서바이벌 게임을 만들고 싶습니다. HamelnAndCompany 2019.08.25 123
스크립트 작성 RMVXA 러닝은빛 님의 한글메세지 시스템 스크립트 게시글이 삭제되서 해당 스크립트를 찾고 있습니다ㅠㅠ 2 objuan 2019.09.04 235
스크립트 작성 RMVXA vx ace)특정 상태일 경우 추가 피해를 주는 패시브 5 게임이만들고파 2021.04.08 127
스크립트 작성 RMVX 특별한 순서없이 조건을 실행 시킬수 있는 방법이 있을까요? 1 송실용 2019.09.28 48
스크립트 작성 RMVXA vx ace 스크립트 공부를 하고싶은데 혹시 참고나 시작에 도움이 될만한 자료가 있을까요? 2 무명유실 2019.11.11 209
스크립트 작성 RMVXA 메뉴창에서 메뉴를 선택했을 때 원래 메뉴 목록이 사라지지 않게하려면 어떻게해야할까요 무명유실 2019.11.12 58
스크립트 작성 RMMV 플러그인 내에 있는 스크립트를 수정하고 싶은데 어디를 어떻게 바꿔야 할 지 모르겠습니다 1 file PPPL 2019.11.12 93
스크립트 작성 RMMV OK 버튼 1회 입력 처리 하는 스크립트 명령은 없을까요? 4 겐마 2020.09.21 185
스크립트 작성 RMVXA VXA 능력치 체크하는 스크립트가 따로 있나요? 2 Maketh 2019.12.19 55
스크립트 작성 RMMV 아이템 유형을 제거하는 방법은 뭔가요? 2 file 호구랑 2019.12.27 235
Board Pagination Prev 1 ... 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 ... 83 Next
/ 83