질문과 답변

Extra Form

안티렉스크립트 쓸려는데 어디에 넣어야하는지 모르겠어요...ㅠㅠ

Comment '9'
  • ?
    페렐 2015.03.11 01:56
    일반적인 스크립트라면 F11 눌러서 나오는 스크립트 에디터 창에서 왼쪽 탭 목록 중 가장 아래의 main 바로 위에다 새 탭을 추가해서 쑤셔넣으면 될 거예요. 새 탭 추가하는 방법은 거기에 대고 오른 클릭.
  • ?
    이리나 2015.03.11 17:56
    main위에다가 넣어봣었는데 적용이 안돼요 ㅠㅠ
  • ?
    페렐 2015.03.11 19:03
    어떤 스크립트인지 알려주실 수 있으세요?
  • ?
    이리나 2015.03.12 22:36
    안티렉스크립트요
    #####################################################
    #Super Simple Anti-Lag System 2.0 By Amaranth
    #Last updated March 22, 2009
    #####################################################
    # Additional Credits:
    # Angelix, Shaz, Near Fantastica
    ####################################################
    # Usage: Free for all to use.
    ####################################################

    #--------------------------------------------------------------------------
    #--------------------------------------------------------------------------
    # SET YOUR ANTI-LAG PERAMETERS
    #--------------------------------------------------------------------------
    #--------------------------------------------------------------------------

    # 1. Set anti-lag for drawing events
    # -----------------------
    # Only draw event GRAPHIC if within this horizontal # of tiles from player
    # Note: if event is outside of this range, and this range is within screen
    # width, the event will appear to "drag" across the screen because the
    # game is not updating the graphic.
    PLAYER_RANGE_WIDTH = 20

    # Only draw event GRAPHIC if within this vertical # of tiles from player
    # Note: if event is outside of this range, and this range is within screen
    # height, the event will appear to "drag" across the screen because the
    # game is not updating the graphic.
    PLAYER_RANGE_HEIGHT = 15


    # 2. Set anti-lag for moving events
    # -----------------------
    # Only process event movement if within this horizontal # of tiles from player
    # Note: if event is outside of this range, and this range is within screen
    # width, the event will stop moving.
    MAP_RANGE_WIDTH = 20

    # Only process event movement if within this vertical # of tiles from player
    # Note: if event is outside of this range, and this range is within screen
    # height, the event will stop moving.
    MAP_RANGE_HEIGHT = 15

    # 3. Set anti-lag movement for specific events
    # -----------------------
    # You can stop the game from updating specific events. This is
    # helpful if you have several events on screen. Only use this on events
    # that are invisible or don't move around.
    # To Use: Create an event on a map and change the name of the event to the
    # value below (by default, this is IGNORE). The name of an event
    # is in the upper-left side of the event dialog box)
    ANTI_LAG_EVENT_NAME = "IGNORE"


    # 4. Turn anti-lag on and off in the game while playing the game
    # ------------------------
    # On some maps in your game, you may not want to use the anti-lag system,
    # or you may want to turn it off during some scenes in your game.
    # To Use: Use a switch to turn anti-lag off and on. (by default this is Switch 1)
    ANTI_LAG_SWITCH = 5



    #--------------------------------------------------------------------------
    #--------------------------------------------------------------------------
    class Game_Character
    #--------------------------------------------------------------------------
    #--------------------------------------------------------------------------
    attr_accessor :inrange_char # event near player? (stop draw)
    attr_accessor :inrange_map # event on map? (stop movement)
    attr_reader :event
    end

    #--------------------------------------------------------------------------
    #--------------------------------------------------------------------------
    class Game_Map
    #--------------------------------------------------------------------------
    #--------------------------------------------------------------------------
    #--------------------------------------------------------------------------
    # * Frame Update
    #--------------------------------------------------------------------------
    def update
    # Refresh map if necessary
    if $game_map.need_refresh
    refresh
    end
    # If scrolling
    if @scroll_rest > 0
    # Change from scroll speed to distance in map coordinates
    distance = 2 ** @scroll_speed
    # Execute scrolling
    case @scroll_direction
    when 2 # Down
    scroll_down(distance)
    when 4 # Left
    scroll_left(distance)
    when 6 # Right
    scroll_right(distance)
    when 8 # Up
    scroll_up(distance)
    end
    # Subtract distance scrolled
    @scroll_rest -= distance
    end

    # Update map event
    for event in @events.values
    # ANTI LAG CHECK START---------------------------------------------
    if ((event.inrange_map == 1) && (event.event.name != ANTI_LAG_EVENT_NAME)) or [3,4].include?event.trigger
    event.update
    end
    # ANTI LAG CHECK END-----------------------------------------------
    end

    # Update common event
    for common_event in @common_events.values
    common_event.update
    end

    # Manage fog scrolling
    @fog_ox -= @fog_sx / 8.0
    @fog_oy -= @fog_sy / 8.0

    # Manage change in fog color tone
    if @fog_tone_duration >= 1
    d = @fog_tone_duration
    target = @fog_tone_target
    @fog_tone.red = (@fog_tone.red * (d - 1) + target.red) / d
    @fog_tone.green = (@fog_tone.green * (d - 1) + target.green) / d
    @fog_tone.blue = (@fog_tone.blue * (d - 1) + target.blue) / d
    @fog_tone.gray = (@fog_tone.gray * (d - 1) + target.gray) / d
    @fog_tone_duration -= 1
    end

    # Manage change in fog opacity level
    if @fog_opacity_duration >= 1
    d = @fog_opacity_duration
    @fog_opacity = (@fog_opacity * (d - 1) + @fog_opacity_target) / d
    @fog_opacity_duration -= 1
    end
    end

    end

    #------------------------------------------------------------------------------
    #------------------------------------------------------------------------------
    # ● Spriteset_Map
    #------------------------------------------------------------------------------
    #------------------------------------------------------------------------------
    class Spriteset_Map

    #--------------------------------------------------------------------------
    # ● Frame Update
    #--------------------------------------------------------------------------
    def update
    # If panorama is different from current one
    if @panorama_name != $game_map.panorama_name or
    @panorama_hue != $game_map.panorama_hue
    @panorama_name = $game_map.panorama_name
    @panorama_hue = $game_map.panorama_hue
    if @panorama.bitmap != nil
    @panorama.bitmap.dispose
    @panorama.bitmap = nil
    end
    if @panorama_name != ""
    @panorama.bitmap = RPG::Cache.panorama(@panorama_name, @panorama_hue)
    end
    Graphics.frame_reset
    end
    # If fog is different than current fog
    if @fog_name != $game_map.fog_name or @fog_hue != $game_map.fog_hue
    @fog_name = $game_map.fog_name
    @fog_hue = $game_map.fog_hue
    if @fog.bitmap != nil
    @fog.bitmap.dispose
    @fog.bitmap = nil
    end
    if @fog_name != ""
    @fog.bitmap = RPG::Cache.fog(@fog_name, @fog_hue)
    end
    Graphics.frame_reset
    end
    # Update tilemap
    @tilemap.ox = $game_map.display_x / 4
    @tilemap.oy = $game_map.display_y / 4
    @tilemap.update
    # Update panorama plane
    @panorama.ox = $game_map.display_x / 8
    @panorama.oy = $game_map.display_y / 8
    # Update fog plane
    @fog.zoom_x = $game_map.fog_zoom / 100.0
    @fog.zoom_y = $game_map.fog_zoom / 100.0
    @fog.opacity = $game_map.fog_opacity
    @fog.blend_type = $game_map.fog_blend_type
    @fog.ox = $game_map.display_x / 4 + $game_map.fog_ox
    @fog.oy = $game_map.display_y / 4 + $game_map.fog_oy
    @fog.tone = $game_map.fog_tone

    # Update character sprites
    for sprite in @character_sprites
    # ANTI LAG CHECK START---------------------------------------------
    if in_range?(sprite.character)
    sprite.update
    end
    # ANTI LAG CHECK END---------------------------------------------
    end

    # Update weather graphic
    @weather.type = $game_screen.weather_type
    @weather.max = $game_screen.weather_max
    @weather.ox = $game_map.display_x / 4
    @weather.oy = $game_map.display_y / 4
    @weather.update
    # Update picture sprites
    for sprite in @picture_sprites
    sprite.update
    end
    # Update timer sprite
    @timer_sprite.update
    # Set screen color tone and shake position
    @viewport1.tone = $game_screen.tone
    @viewport1.ox = $game_screen.shake
    # Set screen flash color
    @viewport3.color = $game_screen.flash_color
    # Update viewports
    @viewport1.update
    @viewport3.update
    end


    #--------------------------------------------------------------------------
    # ● Check if events are in range (ANTI-LAG)
    #--------------------------------------------------------------------------
    def in_range?(event)

    diff_x = ($game_player.real_x - event.real_x).abs # absolute value
    diff_y = ($game_player.real_y - event.real_y).abs # absolute value

    # update the graphic for the event in this range
    player_width = 128 * PLAYER_RANGE_WIDTH
    player_height = 128 * PLAYER_RANGE_HEIGHT

    # update actions being performed by the event in this range
    screen_width = 128 * MAP_RANGE_WIDTH
    screen_height = 128 * MAP_RANGE_HEIGHT

    # stop an event from performing actions if outside of this range on the map
    # note: if range is small, event will stop moving and performing tasks on screen
    if ((diff_x < screen_width && diff_y < screen_height) or $game_switches[ANTI_LAG_SWITCH])
    event.inrange_map = 1
    else
    event.inrange_map = 0
    end

    # stop an event's graphic from updating if outside of the range around player
    # note: if range is small, event graphic will appear to "drag" across screen
    # this happens because the graphic is not updating.
    if ((diff_x < player_width && diff_y < player_height) or $game_switches[ANTI_LAG_SWITCH])
    event.inrange_char = 1
    return true
    else
    event.inrange_char = 0
    return false
    end

    end
    end
  • ?
    이리나 2015.03.12 22:37
    이 스크립트입니다.
  • ?
    페렐 2015.03.13 10:43
    앞부분에 설명서가 나와있네요~
    1, 2 플레이어 기준으로 OO칸 옆의 이벤트는 그리지 않습니다.
    플레이어에게서 몇 칸 이상 떨졌을 때 그리지 않을까요?- 기본 설정 - 높이 15칸, 너비 20칸

    3. 가끔 맵에 존재하는 이벤트를 작동하지 않도록 만들어야할 때가 있습니다. 이러한 '존재하지만 작동하지 않는' 이벤트를 만드시려면 이벤트 이름을 'IGNORE'라고 정해주세요. 아래 설정에서 키워드를 변경할 수 있습니다.

    4. 안티랙 스크립트를 발동시키려면 5번 스위치를 ON시켜주세요. 아래 설정에서 트리거 스위치를 변경할 수 있습니다.


    이 경우 4번이 문제였나보네요 :) 스위치 5번을 ON시켜줘야 작동하는 스크립트입니다.
  • ?
    이리나 2015.03.13 19:30
    음... 스위치 5번을 ON시킬려면 어떤 수를 넣어야하나요??
  • ?
    페렐 2015.03.13 22:15
    이벤트(NPC나 문같은 거 만들 때 쓰는, 맵 더블클릭하면 나오는 창)에서 설정하실 수 있어요.
    문장의 표시나 그런 기능들 있는 창(이벤트 창에서 오른쪽 빈 칸 누르면 나오는 목록)에서 '스위치의 조절'인가.. 그걸 누르시고 설정하시면 됩니다!
  • ?
    이리나 2015.03.14 11:45
    아 이제 제대로 적용됬네요ㅠㅠ 답변 정말 감사드립니다!!ㅠㅠㅠ

List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 12392
RMXP [RPG XP] 이벤트종료후 캐릭터를 바꾸게하는방법 (일명 전직같은... 전 아직 이런걸 못해서 ㅎㅎ) 1 YT놔이트 2015.08.02 201
RMXP gamebattler1 57번째 줄 오류 ㅠㅠ 1 닉네임이많아123 2015.07.24 118
RMXP 불빛 효과 내는법 5 file nachthexen 2015.07.23 253
RMXP 이벤트에도 발소리 넣는법 2 nachthexen 2015.07.23 196
RMXP 변수에 연산하여 그 사이의 수를 나오게 하는방법 3 어스 2015.07.17 197
RMXP 미니게임을 알만툴에 삽입해서 넣으려면 사과나무의섬 2015.07.11 201
RMXP XP 전체키 스크립트로 방향키 수정했는데, 8방향이나 점프, 대쉬가 안먹혀요..도와주세요ㅜ file 비형 2015.06.27 492
RMXP 스킬의 커먼이벤트 사용시, 커먼이벤트가 먼저 발동되고 스킬이 나가게하는법좀요.. 1 file 제이딜라 2015.06.20 228
RMXP 게임을 만들었는데요 남들이 수정 못하게 파일 잠그는 방법 없나요? 5 새우쾅 2015.06.16 349
RMXP xp 액알 만드는데요~ 방어구에 최대hp 도입시키는거 방법좀 알려주세요 ㅠ 4 새우쾅 2015.06.15 155
RMXP 전투 스크립트에 조건에 이름을 대입시키고 싶습니다. Ringccubus 2015.06.12 153
RMXP 카톡 햄버거셋트 기프티콘 1장 걸고 질문드립니다. 5 file 새우쾅 2015.06.06 331
RMXP xp 액알 만드는 중인데 몹 경험치가 계속 들어와요... 2 file 새우쾅 2015.06.05 156
RMXP XP 해상도 오류 제이버 2015.05.28 149
RMXP 캐릭터 머리위에 대화가 뜨게하고 싶습니다 1 TwoBrain 2015.05.25 316
RMXP 윈도우8 호환문제 rarf 2015.05.24 105
RMXP RPG XP에서 현재 이런 배틀 시스템을 구현한 스크립트나 게임이 있나요? 1 제이딜라 2015.04.12 217
RMXP 캐릭터 위로 지나가기, 터널, 통과 3 뻑커칩 2015.04.08 255
RMXP 장신구는 조건분기에서 버그가 있네요 디프링 2015.03.11 154
RMXP 안티렉스크립트 어떻게 쓰나요?? 9 이리나 2015.03.10 326
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 90 Next
/ 90