질문과 답변

Extra Form

Con_sp = 1
module DASH 
  DASH_BUTTON = Input::C 
  NORMAL_SPEED = 4 
  DASH_SPEED = 5 
  HIGH_SPEED = 5.5 
  HIGH_DASH = true 
  HIGH_TIME = 30 
  NOT_SWITCH = 1 
  HIGH_NOT_SWITCH = 2
end
class Game_Player < Game_Character 
  def update
    @dash = 0        if @dash == nil 
    last_moving = moving? 
    unless moving? or $game_system.map_interpreter.running? or
          @move_route_forcing or $game_temp.message_window_showing
      if $game_switches[DASH::NOT_SWITCH] == false
        if Input.press?(DASH::DASH_BUTTON)
          $game_party.actors[0].sp -= Con_sp
          if @move_speed != DASH::DASH_SPEED
            @move_speed = DASH::DASH_SPEED
          end
          if $game_switches[DASH::HIGH_NOT_SWITCH] == false
            @dash += 1
            if @dash >= DASH::HIGH_TIME
              if @move_speed != DASH::HIGH_SPEED
                @move_speed = DASH::HIGH_SPEED
              end
            end
          end
        else
          if @move_speed != DASH::NORMAL_SPEED
            @move_speed = DASH::NORMAL_SPEED
          end
          @dash = 0
        end
      else
        if @move_speed != DASH::NORMAL_SPEED
          @move_speed = DASH::NORMAL_SPEED
        end
      end 
      case Input.dir4
      when 2
        move_down
      when 4
        move_left
      when 6
        move_right
      when 8
        move_up
      end
    end 
    last_real_x = @real_x
    last_real_y = @real_y
    super 
     if @real_y > last_real_y and @real_y - $game_map.display_y > CENTER_Y  
      $game_map.scroll_down(@real_y - last_real_y)
    end 
      if @real_x < last_real_x and @real_x - $game_map.display_x < CENTER_X 
      $game_map.scroll_left(last_real_x - @real_x)
    end 

    if @real_x > last_real_x and @real_x - $game_map.display_x > CENTER_X 
      $game_map.scroll_right(@real_x - last_real_x)
    end 
     if @real_y < last_real_y and @real_y - $game_map.display_y < CENTER_Y 

      $game_map.scroll_up(last_real_y - @real_y)
    end 
    unless moving?  
      if last_moving 

        result = check_event_trigger_here([1,2]) 
        if result == false 
          unless $DEBUG and Input.press?(Input::CTRL) 
            if @encounter_count > 0
              @encounter_count -= 1
            end
          end
        end
      end 
      if Input.trigger?(Input::C) 
        check_event_trigger_here([0])
        check_event_trigger_there([0,1,2])
      end
    end
  end
end
if

-------------------------------------------------------------------------------------

 

이 스크립튼데 mp 다는거 까진햇는데 mp 다깍이고 비활성화/ 활성화 하는방법좀 ..

Who's 놀다가

profile

시간은 기다려주지 않는다.

Comment '1'
  • profile
    습작 2011.07.25 10:36

    if $game_switches[DASH::NOT_SWITCH] == false && $game_party.actors[0].sp > 0


    위와같이 추가 조건을 넣어주면 됩니다.


List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 12448
RMXP 보행그래픽에 관해 질문드립니다. 1 csw7201 2011.09.10 1379
RMXP 대쉬 스크립트 mp 다떨어지면 못쓰게하는법 1 놀다가 2011.07.09 1378
RMXP 아이템주게하기 호빵먹자 2011.04.04 1376
RMXP 스크립트 해석 부탁드립니다. 1 ssbest1015 2011.05.22 1376
RMXP RPGXP 게임 한글화를 하려고 하는데 일부 일본어,한자가 ?로 보입니다. 1 file EXKAGE 2014.08.12 1376
RMXP 타일셋이라고 하나요? 그게 투명하지 않아요. 4 file 덩치큰아이 2012.09.25 1373
RMXP 액알 모션 만드는 강좌 있었는데 어디있죠..? 1 프레 2011.05.10 1368
RMXP RPG XP 윈도우 스킨 명칭! 6 file 제프 2014.05.16 1368
RMXP 아이템에 관해서... 1 짜식 2011.07.18 1367
RMXP CG 수집 기능을 구현할 수 있을까요? 6 얍얍 2013.10.18 1366
RMXP 에러해결 좀 해주세요~~~("제발 답변좀........"이 문제에 답변해주신분 좀 보세요) 1 file 대작만들거임 2011.07.09 1365
RMXP 물건장식할때 주위가 검은색으로 되는거없에는거 알려주세요 1 rpgxp만드는초보 2014.01.05 1365
RMXP 조건분기: A키를 누르고 있을 경우 설정하는법좀 알려주세요 11 file 석진이 2011.05.18 1362
RMXP 타일 크기 맞추는 법 알려주세요 5 file 박하우유 2013.07.18 1361
RMXP 병렬처리된 이벤트의 종료. 2 file 흑십자군 2011.05.22 1359
RMXP 테두리 문제... 2 file www.waptopia.wo.tc 2011.06.16 1358
RMXP 레이어 2에 만든 벽과 물건들을 캐릭터가 뚫고 지나갑니다... 1 클로토 2011.04.19 1355
RMXP 아오오니 패러디 버전 게이오니를 만드려고 하는데... 2 아방님 2013.10.03 1355
RMXP XP 네오 모드 7 3D와 각종 모드와의 충돌 문제 2 찹쌀 2010.09.14 1354
RMXP 스크립트 구문 이해 불가.. 6 말짱꽝이지롱 2012.07.29 1353
Board Pagination Prev 1 ... 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 ... 90 Next
/ 90