질문과 답변

RMVX
2016.01.09 20:45

주석을 끄고싶어여

profile
조회 수 154 추천 수 0 댓글 0
Atachment
첨부 '1'
Extra Form
캡처44.JPG

보시는 바와같이 주석이 다른이벤트로 없애려고 해도 없어지지 않고 계속 켜져있습니다. 주석을 이벤트나 스위치로 끌 수 없을까여?


해당 스크립트입니다,.



#==============================================================================
# ■ Light Effects VX 1.1
#     5.21.2008
#------------------------------------------------------------------------------
#  Script by: Kylock (originally for RMXP by Near Fantastica)
#==============================================================================
#   To make an event glow, give it a Comment: with any of the supported light
# modes.
#   The SWITCH setting below will disable light effects from updating with the
# switch is on.
#==============================================================================
# ● Change Log
#------------------------------------------------------------------------------
# 1.0 - Original Release
# 1.1 - New light modes added: LIGHT2, TORCH, TORCH2
#     - Changed sprite blend mode to ADD (looks slightly better)
#     - Fire-based lights are now red in color
#==============================================================================
# ● Light Modes
#------------------------------------------------------------------------------
#   GROUND - Medium steady white light.
#   FIRE   - Large red light with a slight flicker.
#   LIGHT  - Small steady white light.
#   LIGHT2 - X-Large steady white light.
#   TORCH  - X-Large red light with a heavy flicker.
#   TORCH2 - X-Large red light with a sleight flicker.
#==============================================================================

class Spriteset_Map
  alias les_spriteset_map_initalize initialize
  alias les_spriteset_map_dispose dispose
  alias les_spriteset_map_update update
  def initialize
    @light_effects = []
    setup_lights
    les_spriteset_map_initalize
    update
  end
  def dispose
    les_spriteset_map_dispose
    for effect in @light_effects
      effect.light.dispose
    end
    @light_effects = []
  end
  def update
    les_spriteset_map_update
    update_light_effects
  end
  def setup_lights
    for event in $game_map.events.values
      next if event.list == nil
      for i in 0...event.list.size
        if event.list[i].code == 108 and event.list[i].parameters == ["GROUND"]
          type = "GROUND"
          light_effects = Light_Effect.new(event,type)
          light_effects.light.zoom_x = 2
          light_effects.light.zoom_y = 2
          light_effects.light.opacity = 100
          @light_effects.push(light_effects)
        end
        if event.list[i].code == 108 and event.list[i].parameters == ["FIRE"]
          type = "FIRE"
          light_effects = Light_Effect.new(event,type)
          light_effects.light.zoom_x = 300 / 100.0
          light_effects.light.zoom_y = 300 / 100.0
          light_effects.light.opacity = 100
          @light_effects.push(light_effects)
        end
        if event.list[i].code == 108 and event.list[i].parameters == ["LIGHT"]
          type = "LIGHT"
          light_effects = Light_Effect.new(event,type)
          light_effects.light.zoom_x = 1
          light_effects.light.zoom_y = 1
          light_effects.light.opacity = 150
          @light_effects.push(light_effects)
        end
        if event.list[i].code == 108 and event.list[i].parameters == ["LIGHT2"]
          type = "LIGHT2"
          light_effects = Light_Effect.new(event,type)
          light_effects.light.zoom_x = 6
          light_effects.light.zoom_y = 6
          light_effects.light.opacity = 150
          @light_effects.push(light_effects)
        end
        if event.list[i].code == 108 and event.list[i].parameters == ["TORCH"]
          type = "TORCH"
          light_effects = Light_Effect.new(event,type)
          light_effects.light.zoom_x = 6
          light_effects.light.zoom_y = 6
          light_effects.light.opacity = 150
          @light_effects.push(light_effects)
        end
        if event.list[i].code == 108 and event.list[i].parameters == ["TORCH2"]
          type = "TORCH2"
          light_effects = Light_Effect.new(event,type)
          light_effects.light.zoom_x = 6
          light_effects.light.zoom_y = 6
          light_effects.light.opacity = 150
          @light_effects.push(light_effects)
        end
      end
    end
    for effect in @light_effects
      case effect.type
      when "GROUND"
        effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
        effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
        effect.light.blend_type = 1
      when "FIRE"
        effect.light.x = (effect.event.real_x - 600 - $game_map.display_x) / 8 + rand(6) - 3
        effect.light.y = (effect.event.real_y - 600 - $game_map.display_y) / 8 + rand(6) - 3
        effect.light.tone = Tone.new(255,-100,-255,   0)
        effect.light.blend_type = 1
      when "LIGHT"
        effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 15
        effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 15
        effect.light.blend_type = 1
      when "LIGHT2"
        effect.light.x = (effect.event.real_x - 1200 - $game_map.display_x) / 8 - 20
        effect.light.y = (effect.event.real_y - 1200 - $game_map.display_y) / 8
        effect.light.blend_type = 1
      when "TORCH"
        effect.light.x = (effect.event.real_x - 1200 - $game_map.display_x) / 8 - 20
        effect.light.y = (effect.event.real_y - 1200 - $game_map.display_y) / 8
        effect.light.tone = Tone.new(255,-100,-255,   0)
        effect.light.blend_type = 1
      when "TORCH2"
        effect.light.x = (effect.event.real_x - 1200 - $game_map.display_x) / 8 - 20
        effect.light.y = (effect.event.real_y - 1200 - $game_map.display_y) / 8
        effect.light.tone = Tone.new(255,-100,-255,   0)
        effect.light.blend_type = 1
      end
    end
  end
  def update_light_effects
    if $game_switches[1]
      for effect in @light_effects
        next if effect.type == "FIRE" || effect.type == "TORCH"
        effect.light.visible = false
      end
    else
      for effect in @light_effects
        next if effect.type == "FIRE" || effect.type == "TORCH"
        effect.light.visible = true
      end
    end
    for effect in @light_effects
      case effect.type
      when "GROUND"
        effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
        effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
      when "FIRE"
        effect.light.x = (effect.event.real_x - 600 - $game_map.display_x) / 8 + rand(6) - 3
        effect.light.y = (effect.event.real_y - 600 - $game_map.display_y) / 8 + rand(6) - 3
        effect.light.opacity = rand(10) + 90
      when "LIGHT"
        effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 15
        effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 15
      when "LIGHT2"
        effect.light.x = (effect.event.real_x - 1200 - $game_map.display_x) / 8 - 20
        effect.light.y = (effect.event.real_y - 1200 - $game_map.display_y) / 8
      when "TORCH"
        effect.light.x = (effect.event.real_x - 1200 - $game_map.display_x) / 8 - 20 + rand(20) - 10
        effect.light.y = (effect.event.real_y - 1200 - $game_map.display_y) / 8 + rand(20) - 10
        effect.light.opacity = rand(30) + 70
      when "TORCH2"
        effect.light.x = (effect.event.real_x - 1200 - $game_map.display_x) / 8 - 20
        effect.light.y = (effect.event.real_y - 1200 - $game_map.display_y) / 8
        effect.light.opacity = rand(10) + 90
      end
    end
  end
end

class Light_Effect
  attr_accessor :light
  attr_accessor :event
  attr_accessor :type
  def initialize(event, type)
    @light = Sprite.new
    @light.bitmap = Cache.picture("le.png")
    @light.visible = true
    @light.z = 1000
    @event = event
    @type = type
  end
end


광원효과 스크립트입니다.

Who's 지혈이

profile

피아니스트(중단)

꿈 꾸는 마녀(완성)


List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 12391
RM2k3 rpg 2003 질문이요 뭉멍이 2017.07.14 153
RMMV 변수 조작을 통한 조건 분기에 대해 질문드립니다. 4 file 유노 2017.05.13 153
RMXP 메뉴창이 안떠요 퀼트 2017.02.21 153
RMVXA RPG메이커 VX ace 달리는 키변경 2 초보주의 2016.12.29 153
사이트 이용 게임 제작 프로그렘 뭐 쓰시는지?? 1 겜덕 2016.12.17 153
RMMV 방어력 수치에 따른 퍼센트 데미지 7 카시어스 2018.12.10 153
RMMV 만렙제한 메뉴가 없네요. 1 자유와바람 2016.10.18 153
RMMV 자동실행 순서에 대해 2 가시밭 2017.08.10 153
RMMV 체력이 일정 이하로 내려가면 자동으로 힐스킬을 쓰게하고싶은데 7 잠행인 2016.07.24 153
RMVXA 그림 회전에 대해서 2 알만툴초보입니당 2017.03.04 153
RMVXA 전투중 TP의 취득을 바꾸고 싶습니다. 1 twoeye 2016.05.31 153
RMVXA 다리 건너기에 관해서 2 file LOOK 2016.05.07 153
RMVXA 타이머의 위치를 게임 도중에 바꾸는 방법 프리마리모 2016.04.13 153
RMXP '조건 분기'의 '스크립트' 부분에 '~장비중'을 스크립트로 입력하려고 하는데 어떤 스크립트를 입력해야 하나요? 5 阿房S 2016.02.28 153
RMXP 검은 공간 못지나가게 하기 1 ㅎㅇ질럿 2016.02.19 153
RMMV 순서대로 버튼을 눌러야지만 이벤트가 실행되게 하려면? 3 file 다연 2015.10.29 153
RMVX 캐릭터칩 짤림 1 시로오니1 2016.03.14 153
RMVXA 타이머가 전혀 작동이 되질 않습니다 ~ 도움부탁드립니다 !! 1 DJN 2016.06.03 153
RMXP 전투 스크립트에 조건에 이름을 대입시키고 싶습니다. Ringccubus 2015.06.12 153
RMVX 스크립트 사용시 등록된 데이터의 초기화 톨톨 2015.06.08 153
Board Pagination Prev 1 ... 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 ... 516 Next
/ 516