질문과 답변

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 21136
RMXP 몬스터 랑 장 만들때 1 상큼한똥 2012.12.17 714
RMXP 액알 1 망북인나 2011.02.24 714
RMXP 게임 직업 질문 1 로돌프 2010.10.27 715
RMXP rpg xp 동영상 찍는법 흙흙흙 2014.03.31 715
RMXP XP로 게임을 만들고 있는데요....[캐릭터 이벤트 문제] 미노 2010.11.15 716
RMXP 주인공에 닿으면 죽기 1 크루즈 2011.02.14 716
RMXP 시작만들기 3 롸있나우 2010.12.05 717
RMXP 게임 테스트를하면 계속 오른쪽으로 가네요 4 8qjsrk 2011.02.24 717
RMXP BGM을 바꿀때 이벤트 또는 액터(주인공)이 속도가 느려져요. 2 Hacker 2010.12.23 718
RMXP 어느 함수의 변수를 불러오는 방법 4 코아 코스튬 2010.10.30 720
RMXP RPG XP 온라인 가능한가요? 3 Super Me 2011.02.01 720
RMXP 이건 대체 어디에 쓰이는 기능이죠? 1 file 데버 2012.12.31 720
RMXP 여러 이벤트를 두고 한 이벤트에게 랜덤으로 아이템을 획득시키려면 어떻게해야하나요? 7 요야 2014.02.28 720
RMXP RPG XP스크립트가 이상해요!!! 3 RPG Game maker 2010.11.23 721
RMXP ABP 액알에서 스킬 문제 Hsik 2010.12.12 721
RMXP 턴알) 10회 (단일)공격하는 이벤트 만들기. 5 file 윌리스 2014.01.29 722
RMXP 혹시 RTAB스크립트쓰시거나 스크립트 잘아시는 분들께 질문좀요 ㅠㅠ 2 file 듀오 2011.01.16 723
RMXP 변수에 대한 오류 8 file 윌리스 2014.03.06 724
RMXP 맵크기 늘리는 방법 1 히트앤런 2011.01.11 725
RMXP 이런 현상은 도대체 왜 일어나는거죠? 5 file 초록곰돌이 2012.12.17 726
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