VX 스크립트

이벤트->  조건분기, 스크립트, 이동루트의스크립트 등에서 쓸 수 있습니다.

get_front_event 라고 적어줄 경우에

앞에 아무것도 없으면 -1을 플레이어가 있으면 0을 이벤트가 있으면 이벤트의 ID를 돌려줍니다.

아래쪽 스크립트를 복사해 사용하시면 됩니다.

 

 

 

class Game_Interpreter
  def get_front_event
    d = @event_id == 0 ? $game_player.direction : $game_map.events[@event_id].direction
    case d
    when 2
      return get_front_event_id([0,1])
    when 4
      return get_front_event_id([-1,0])
    when 6
      return get_front_event_id([1,0])
    when 8
      return get_front_event_id([0,-1])
    end
  end
  def get_front_event_id(xy)
    if @event_id > 0 and $game_player.x == ($game_map.events[@event_id].x + xy[0]) and
      $game_player.y == ($game_map.events[@event_id].y + xy[1])
      return 0
    end
    ary = $game_map.events_xy($game_map.events[@event_id].x + xy[0], $game_map.events[@event_id].y + xy[1])
    id = ary == [] ? -1 : ary[0].id
    return id
  end
end
class Game_Event < Game_Event
  def get_front_event
    return @interpreter.get_front_event
  end
end

 

#

Who's 허걱

?

공개된 사이트에서 퍼온 자료를 제외한(이 경우는 글에 출처를 남깁니다.)

제가 올린 모든 글과 자작 자료에대해 무단으로 퍼가는것을 금지합니다.

Comment '6'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5398
377 전투 커먼이벤트 컷인 스크립트 15 허걱 2009.08.23 3399
376 기타 클리어 횟수 기록하기 8 file 허걱 2009.08.22 2729
» 기타 앞에있는 이벤트 아이디 찾기 6 허걱 2009.08.21 2091
374 제작도구 Icon Preview Window by Woratana 8 file 허걱 2009.08.20 2890
373 HUD 아이콘 그리기 7 file 허걱 2009.08.20 4441
372 이동 및 탈것 Paper Mario Walk 7 file 카르와푸딩의아틀리에 2009.08.19 2697
371 전투 Spirits System 정령 장착?이라고해야되나; 26 file 카르와푸딩의아틀리에 2009.08.19 3869
370 맵/타일 추가 맵칩 사용 - 공개 34 file 허걱 2009.08.19 6491
369 이동 및 탈것 Rei Advanced Movement System 8 file 카르와푸딩의아틀리에 2009.08.19 2624
368 오디오 사운드테스트 스크립트 13 file 카르와푸딩의아틀리에 2009.08.19 2106
367 기타 범용 게이지 묘화 - KGC 14 file 카르와푸딩의아틀리에 2009.08.19 3476
366 메뉴 확장 스테이터스 화면 - KGC 23 file 카르와푸딩의아틀리에 2009.08.19 5057
365 스킬 DQ특기풍스킬 - KGC 4 카르와푸딩의아틀리에 2009.08.19 3288
364 기타 스크립트로 커먼 이벤트 실행 [수정] 3 허걱 2009.08.17 2311
363 기타 확장 에러 메시지 13 file 허걱 2009.08.17 2497
362 기타 거리계산 스크립트 (XP가능) 7 file 허걱 2009.08.16 2848
361 기타 말풍선 그림 바꾸기 6 file 허걱 2009.08.15 3561
360 메시지 [완성]RPG Maker VX용 한글 조사 자동결정 10 file 시릴캣 2009.08.13 4598
359 타이틀/게임오버 타이틀 공지 37 file 허걱 2009.08.10 4748
358 기타 글씨표시 스크립트 32 file 허걱 2009.08.10 4421
Board Pagination Prev 1 ... 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 ... 32 Next
/ 32