Хорошо! Хорошо!:  0
Плохо! Плохо!:  0
Показано с 1 по 6 из 6

Тема: Нужен скрипт rpgm xp

  1. #1
    Пользователь Аватар для Izatop
    Информация о пользователе
    Регистрация
    30.01.2009
    Сообщений
    39
    Репутация: 2 Добавить или отнять репутацию

    Нужен скрипт rpgm xp

    Люди добрые! Поделитесь скриптом на движения в восемь сторон, которы будет работать со стандартным чарсетом...
    Последний раз редактировалось Izatop; 05.04.2009 в 14:06.

  2. #2
    Пользователь Аватар для insider
    Информация о пользователе
    Регистрация
    24.04.2008
    Сообщений
    86
    Репутация: 1 Добавить или отнять репутацию

    По умолчанию

    PHP код:
    #==============================================================================
    # ** Game_Player
    #------------------------------------------------------------------------------
    #  This class handles the player. Its functions include event starting
    #  determinants and map scrolling. Refer to "$game_player" for the one
    #  instance of this class.
    #==============================================================================

    class Game_Player Game_Character
      
    #--------------------------------------------------------------------------
      # * Frame Update
      #--------------------------------------------------------------------------
      
    def update
        
    # Remember whether or not moving in local variables
        
    last_moving moving?
        
    # If moving, event running, move route forcing, and message window
        # display are all not occurring
        
    unless moving? or $game_system.map_interpreter.running? or
               @
    move_route_forcing or $game_temp.message_window_showing
          
    # Move player in the direction the directional button is being pressed
          
    case Input.dir8
          when 1
            move_lower_left
          when 2
            move_down
          when 3
            move_lower_right
          when 4
            move_left
          when 6
            move_right
          when 7
            move_upper_left
          when 8
            move_up
          when 9
            move_upper_right
          end
        end
        
    # Remember coordinates in local variables
        
    last_real_x = @real_x
        last_real_y 
    = @real_y
        super
        
    # If character moves down and is positioned lower than the center
        # of the screen
        
    if @real_y last_real_y and @real_y $game_map.display_y CENTER_Y
          
    # Scroll map down
          
    $game_map.scroll_down(@real_y last_real_y)
        
    end
        
    # If character moves left and is positioned more let on-screen than
        # center
        
    if @real_x last_real_x and @real_x $game_map.display_x CENTER_X
          
    # Scroll map left
          
    $game_map.scroll_left(last_real_x - @real_x)
        
    end
        
    # If character moves right and is positioned more right on-screen than
        # center
        
    if @real_x last_real_x and @real_x $game_map.display_x CENTER_X
          
    # Scroll map right
          
    $game_map.scroll_right(@real_x last_real_x)
        
    end
        
    # If character moves up and is positioned higher than the center
        # of the screen
        
    if @real_y last_real_y and @real_y $game_map.display_y CENTER_Y
          
    # Scroll map up
          
    $game_map.scroll_up(last_real_y - @real_y)
        
    end
        
    # If not moving
        
    unless moving?
          
    # If player was moving last time
          
    if last_moving
            
    # Event determinant is via touch of same position event
            
    result check_event_trigger_here([1,2])
            
    # If event which started does not exist
            
    if result == false
              
    # Disregard if debug mode is ON and ctrl key was pressed
              
    unless $DEBUG and Input.press?(Input::CTRL)
                
    # Encounter countdown
                
    if @encounter_count 0
                  
    @encounter_count -= 1
                end
              end
            end
          end
          
    # If C button was pressed
          
    if Input.trigger?(Input::C)
            
    # Same position and front event determinant
            
    check_event_trigger_here([0])
            
    check_event_trigger_there([0,1,2])
          
    end
        end
      end
    end 

  3. #3

    По умолчанию

    Боже... теперь любая тема с фразами о "8 сторон" меня начинает пугать...
    *Буду верить в православно, я буду избавляться от паранойи*...

    © Надо преуспеть в своей задаче и... мы будем знать, что она то, что намного ближе к тому, чтобы быть тогда...

  4. #4
    Создатель Аватар для Рольф
    Информация о пользователе
    Регистрация
    14.04.2008
    Адрес
    Южно- Сахалинск/Пенза
    Сообщений
    10,095
    Записей в дневнике
    2
    Репутация: 108 Добавить или отнять репутацию

    По умолчанию

    Тема для таких вопросов есть. Все сообщения будут перетащены туда.

  5. #5
    Пользователь Аватар для Izatop
    Информация о пользователе
    Регистрация
    30.01.2009
    Сообщений
    39
    Репутация: 2 Добавить или отнять репутацию

    По умолчанию

    2 insider спасибо!!!

  6. #6
    Пользователь Аватар для Okadzaki
    Информация о пользователе
    Регистрация
    31.01.2011
    Сообщений
    60
    Репутация: 4 Добавить или отнять репутацию

    По умолчанию

    а мне 4 стороны больше нравится спрайтов менше рисовать =)))
    -----------------------------------------------
    Спойлер :

    Love CLANNAD

Информация о теме

Пользователи, просматривающие эту тему

Эту тему просматривают: 1 (пользователей: 0 , гостей: 1)

Социальные закладки

Социальные закладки

Ваши права

  • Вы не можете создавать новые темы
  • Вы не можете отвечать в темах
  • Вы не можете прикреплять вложения
  • Вы не можете редактировать свои сообщения
  •  
Нужен скрипт rpgm xp