질문과 답변

RMVX
2016.01.09 20:45

주석을 끄고싶어여

profile
조회 수 153 추천 수 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 12387
RMVX 폰트 테두리 색깔변경은 어떻게하는건가요? 2 윸키킹 2016.03.14 295
RMVX script 'cache' line 80 revenir 2016.03.01 155
RMVX 게임 오버, 엔딩을 보아도 특정 스위치는 그대로되게 하고싶습니다. KAHP 2016.02.25 223
RMVX HP가 적으면 자동으로 상태변화 1 J_chisee45 2016.02.24 141
RMVX 스크립트 오류.. 2 file vmfl 2016.02.24 137
RMVX 캐릭터가 벽을 자꾸 넘어요.. 1 file vmfl 2016.02.22 184
RMVX 캐릭터가 이동을 안합니다. 2 vmfl 2016.02.21 161
RMVX 스킬 사용조건 스크립트를 사용하고싶은데..에러는 안나거든요? 근데 적용이 안되요~ 액알의대가가되자 2016.02.07 109
RMVX 스킬 사용 조건 스크립트를 사용하고 싶은데요~~ 액알의대가가되자 2016.02.06 94
RMVX 추적 이벤트 관련 질문. 1 file 머리큰두두 2016.01.28 134
RMVX 대화할때 나오는 글자의 크기 조절하는법 3 지혈이 2016.01.24 282
RMVX 타이틀 메뉴창을 바꾸고 싶습니다. 페포릴 2016.01.17 260
RMVX 적캐릭터를 피플1,2,3으로 하고싶어요 3 데이비드000 2016.01.13 123
RMVX 저장용 슬롯을 늘리고 싶어요. 1 지나기 2016.01.12 191
RMVX VX에서 기차스크립트가 불러오기시에만 오류가 뜹니다. file MUTLG 2016.01.12 119
RMVX 게임 완성했는데 다른컴퓨터에서 소리가 안나요 4 MUTLG 2016.01.12 251
RMVX 주석을 끄고싶어여 file 지혈이 2016.01.09 153
RMVX 이벤트를 1번만 실행하게 하는 법좀 알려주세요 4 mzlaow 2016.01.09 159
RMVX 타일을 깔았는데 그 주변이 바닥 타일이 아니라 공백으로 변해버리는 경우에 대해서. 2 file 위리리릴 2015.12.28 260
RMVX 맵타일이 중간에서 끊기는 현상은 어떻게 해야 하나요? 2 file 위리리릴 2015.12.20 164
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 127 Next
/ 127