XP 스크립트

#==============================================================================
# ■ Sprite_Mirror
# Based on Sprite_Shadow, modified by Rataime
#==============================================================================

class Sprite_Mirror < RPG::Sprite

attr_accessor :character
attr_accessor :events
attr_accessor :event_y

def initialize(viewport=nil)
  super(viewport)
  @character = $game_player
  @events=0
  @event_y=0
  self.opacity=0
  update
end

def update
  super
  if @tile_id != @character.tile_id or
    @character_name != @character.character_name or
    @character_hue != @character.character_hue
    @tile_id = @character.tile_id
    @character_name = @character.character_name
    @character_hue = @character.character_hue
    if @tile_id >= 384
      self.bitmap = RPG::Cache.tile($game_map.tileset_name,
        @tile_id, @character.character_hue)
      self.src_rect.set(0, 0, 32, 32)
      self.ox = 16
      self.oy = 32
    else
      self.bitmap = RPG::Cache.character(@character.character_name,
        @character.character_hue)
      @cw = bitmap.width / 4
      @ch = bitmap.height / 4
      self.ox = @cw / 2
      self.oy = @ch
    end
  end
  self.visible = (not @character.transparent)
  if @tile_id == 0
    sx = (@character.pattern) * @cw
    sy = (@character.direction - 2) / 2 * @ch
    if @character.direction==8
      sy = 0 * @ch
    end
    if @character.direction==2
      sy = 3 * @ch
    end
    self.src_rect.set(sx, sy, @cw, @ch)
  end
  self.x = @character.screen_x
  self.y = self.event_y-($game_player.screen_y-self.event_y).abs+30
  self.z = 10
  self.blend_type = @character.blend_type
  self.bush_depth = @character.bush_depth
  if @character.animation_id != 0
    animation = $data_animations[@character.animation_id]
    animation(animation, true)
    @character.animation_id = 0
  end
end
end

#===================================================
# ▼ CLASS Sprite_Character edit
#===================================================

class Sprite_Character < RPG::Sprite
 alias mirror_initialize initialize
 
 def initialize(viewport, character = nil)
  @character = character
  super(viewport)
  if character.is_a?(Game_Player)
    $game_map.mirror=Sprite_Mirror.new(viewport)
  end
  mirror_initialize(viewport, @character)
 end
 
 alias mirror_update update
 
 def update
  mirror_update
  if (@mirror!=nil and character.is_a?(Game_Event) and character.list!=nil and character.list[0].code == 108 and character.list[0].parameters == ["m"])
    if $game_player.screen_y-self.y<80 and self.y<$game_player.screen_y and ($game_player.screen_x-self.x).abs<17
      if (character.list[1]!=nil and character.list[1].code == 108)
        @mirror.opacity=character.list[1].parameters[0].to_f
      else
        @mirror.opacity=$game_player.opacity
      end
      @mirror.events=self.id
      @mirror.event_y=self.y
    else
      if @mirror.events==self.id
        @mirror.events=0
      else
        if @mirror.events==0
          @mirror.opacity=0
        end
      end
    end
  end
  @mirror=$game_map.mirror
  if character.is_a?(Game_Player)
    @mirror.update
  end
 end
 
end

#===================================================
# ▼ CLASS Scene_Save edit
#===================================================
class Scene_Save < Scene_File
 
 alias mirror_write_save_data write_save_data
 
 def write_save_data(file)
  $game_map.mirror = nil
  mirror_write_save_data(file)
 end
end

#===================================================
# ▼ CLASS Game_Map edit
#===================================================
class Game_Map
 attr_accessor :mirror
end

#===================================================
# ▼ CLASS Scene_Map edit
#===================================================
class Spriteset_Map
 
 alias mirror_map_initialize initialize
 
 def initialize
  $game_map.mirror=nil
  mirror_map_initialize
 end
end

Who's 백호

?

이상혁입니다.

http://elab.kr

Comment '2'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
361 기타 무기 회피율, 방어구 공격력 지정 스크립트 6 백호 2009.02.22 1244
360 기타 무기& 방어구 레벨제한 스크립트 23 file 백호 2009.02.21 1880
359 변수/스위치 무기변수 스크립트 1 file 백호 2009.02.22 1614
358 메시지 문자 메세지 띄우기 스크립트 10 file 백호 2009.02.21 3069
357 전투 물리친 적의수 표시 file 백호 2009.02.21 1131
356 미니맵 미니맵 만들기~! 14 file 블리치캐릭셋원함 2010.11.24 4350
355 미니맵 미니맵 스크랩트 + 예재 15 file WMN 2008.03.17 2674
354 미니맵 미니맵(중복률100%? 한글번역!) 17 백호 2009.02.21 3423
353 미니맵 미니맵을 표시해주는 스크립트입니다... 41 file - 하늘 - 2009.08.05 5191
352 이동 및 탈것 밑에 KIN 님의 MP 없어지는 대쉬, 제가 손좀 봤음 1 백호 2009.02.22 1244
351 상점 밑에 글 영어로 뜨는거 수정(여관시스템) 7 file 백호 2009.02.22 1683
350 이동 및 탈것 반칸 이동하기 14 file 느싱 2009.03.09 3458
349 기타 발소리 스크립트 4 file 백호 2009.02.21 1614
348 기타 밤/낮 변화 시스템 스크립트 4 file 백호 2009.02.21 1770
347 밤낮 구별 하는 스크랩트 입니다..? 32 WMN 2008.03.17 2552
346 전투 방어시에 속성 저항,스테이트무시 스크립트 1 백호 2009.02.22 1017
345 전투 방어시회복하는거래요. 8 카르닉스 2010.02.26 1579
344 이동 및 탈것 방향키를 누름에따라 점프의 거리가 길어진다 - 출처:엑사포 의 비밀소년님과 연금술사님의 스크립트를 개량함 3 백호 2009.02.21 1234
343 전투 배틀 리포트 화면 변경 스크립트 2 file 백호 2009.02.21 1442
342 전투 배틀 스테이터스·클리어 디자인 13 file 백호 2009.02.21 2467
Board Pagination Prev 1 ... 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 ... 52 Next
/ 52