질문과 답변

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 12452
RMXP 다운받은 캐릭터가 조금 잘리거나 모습이 바뀜 6 file 포레버아이둔 2013.06.23 1080
RMXP 다음맵으로 가는거 어떻게 어떻게가죠?? 3 apple0123 2011.06.08 2030
RMXP 단거리 액알 캐릭터가 몬스터를 치면 빙글빙글 돕니다 잡초용 2010.11.07 785
RMXP 단어 인식 처리 ! 3 제프 2014.05.11 572
RMXP 단축키 점프 같은 단축키 2 MR.Jey 2011.11.13 2182
RMXP 단축키 추가에 대한 질문입니다. 1 환장 2011.03.15 1129
RMXP 달리기 질문 1 유리YURI 2013.06.07 663
RMXP 대규모 파티 질문 avangs에 있는 스크립트는 죄다 실행해 봤는데 안되네요 file 겜웅이 2016.05.14 103
RMXP 대사질문 2 초코파일 2013.05.24 934
RMXP 대쉬 스크립트 mp 다떨어지면 못쓰게하는법 1 놀다가 2011.07.09 1378
RMXP 대쉬중에 그래픽 바뀌는 스크립트 있나요? 4 모르모트 2012.09.10 1094
RMXP 대채 뭘 건드려야 맵이 이렇게되죠? 2 게임이좋아 2011.08.28 2176
기타 RMXP 대체 왜 타일 추가가 않되는 걸까요ㅠㅠ 3 file 상어뽑기_샤샤 2019.02.13 82
RMXP 대화 상에서 캐릭터 이름을 NPC가 부르게 하는 방법. 6 죽었다 2018.08.12 776
RMXP 대화 형식 이벤트 3 오늘밤어때 2012.11.14 717
RMXP 대화명령어좀ㅠㅠ 1 Snack-Yum-Yum 2014.11.16 295
RMXP 대화중 얼굴나오게하는거ㄷㄷ 1 게임이좋아 2011.03.27 1820
RMXP 대화창 (문장) 넘어가는 속도문제 1 포레버아이둔 2013.06.22 651
기타 RMXP 대화창 색 바꾸는 법이 알고 싶습니다. 2 file 상어뽑기_샤샤 2019.02.12 1343
RMXP 대화창 색깔바꾸기 1 봉지스 2012.08.14 1183
Board Pagination Prev 1 ... 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 ... 90 Next
/ 90