Страница 113 из 143 ПерваяПервая ... 1363103111112113114115123 ... ПоследняяПоследняя
Показано с 1,121 по 1,130 из 1426

Тема: Помощь с скриптами (RGSS)

  1. #1121
    Маститый Аватар для HopeBree
    Информация о пользователе
    Регистрация
    28.03.2013
    Сообщений
    1,184
    Записей в дневнике
    6
    Репутация: 38 Добавить или отнять репутацию

    По умолчанию

    доброго времени суток, нарыл скрипты на увеличение фреймов персонажа до 6/8 и тп
    на их основе попробовал допилить любое кол-во фреймов
    собственно как это работает теперь
    дописывается кол-во фреймов с префиксом f_, например char1 f_12.png. в итоге получаем рабочий спрайтсет на персонажа с 12 фреймами, вместо стандартных 4.
    но вот загвоздка, тк в скриптинге я практически 0, особенно в хр, тк почти всю жизнь ковырял только асе, ни как не могу прикрутить его к самому меню class Window_Base < Window.
    выдает либо ошибку, либо стандартный спрайт на 4 фрейма.
    PHP код:
    class Sprite_Character RPG::Sprite
      def character_frames
        
    @character_name.gsub(/f\_(\d+)/) do
          if $
    != @character_name
            
    return $1.to_i
          end
        end
        
    return 4
      end
    end

    class Game_Character
      def character_frames
        
    @character_name.gsub(/f\_(\d+)/) do
          if $
    != @character_name
            
    return $1.to_i
          end
        end
        
    return 4
      end
    end

    class Game_Character
      def update
        
    if jumping?
          
    update_jump
        elsif moving
    ?
          
    update_move
        
    else
          
    update_stop
        end
        
    if @anime_count 18 - @move_speed 2
          
    if not @step_anime and @stop_count 0
            
    @pattern = @original_pattern
          
    else
            @
    pattern = (@pattern 1) % (self.is_a?(Game_Player) ? character_frames 4)
          
    end
          
    @anime_count 0
        end
        
    if @wait_count 0
          
    @wait_count -= 1
          
    return
        
    end
        
    if @move_route_forcing
          move_type_custom
          
    return
        
    end
        
    if @starting or lock?
          return
        
    end
        
    if @stop_count > (40 - @move_frequency 2) * (- @move_frequency)
          case @
    move_type
          when 1
            move_type_random
          when 2
            move_type_toward_player
          when 3
            move_type_custom
          end
        end
      end
    end

    class Sprite_Character
      def update
        super
        
    if @tile_id != @character.tile_id or
           @
    character_name != @character.character_name or
           @
    character_hue != @character.character_hue
          
    @tile_id = @character.tile_id
          
    @character_name = @character.character_name
          
    @character_hue = @character.character_hue
          
    if @tile_id >= 384
            self
    .bitmap RPG::Cache.tile($game_map.tileset_name,
              @
    tile_id, @character.character_hue)
            
    self.src_rect.set(003232)
            
    self.ox 16
            self
    .oy 32
          
    else
            
    self.bitmap RPG::Cache.character(@character.character_name,
              @
    character.character_hue)
            @
    cw bitmap.width / (@character.is_a?(Game_Player) ? character_frames 4)
            @
    ch bitmap.height 4
            self
    .ox = @cw 2
            self
    .oy = @ch
          end
        end
        self
    .visible = (not @character.transparent)
        if @
    tile_id == 0
          sx 
    = @character.pattern * @cw
          sy 
    = (@character.direction 2) / * @ch
          self
    .src_rect.set(sxsy, @cw, @ch)
        
    end
        self
    .= @character.screen_x
        self
    .= @character.screen_y
        self
    .= @character.screen_z(@ch)
        
    self.opacity = @character.opacity
        self
    .blend_type = @character.blend_type
        self
    .bush_depth = @character.bush_depth
        
    if @character.animation_id != 0
          animation 
    $data_animations[@character.animation_id]
          
    animation(animationtrue)
          @
    character.animation_id 0
        end
      end
    end 

  2. #1122
    Маститый Аватар для HopeBree
    Информация о пользователе
    Регистрация
    28.03.2013
    Сообщений
    1,184
    Записей в дневнике
    6
    Репутация: 38 Добавить или отнять репутацию

    По умолчанию

    Нашел в чем вся соль была D:

  3. #1123
    Маститый Аватар для HopeBree
    Информация о пользователе
    Регистрация
    28.03.2013
    Сообщений
    1,184
    Записей в дневнике
    6
    Репутация: 38 Добавить или отнять репутацию

    По умолчанию

    имеется скрипт под хр
    Спойлер :
    PHP код:
    #===============================================================================
    # Pixel Platformer v1.2 by G@MeF@Ce 7/10/2011 "GPLAT 1 of 2" 
    # [url]http://www.gameface101.com[/url]
    #-------------------------------------------------------------------------------
    # Original Pixel Movement Script by Cogwheel from 66rpg.com
    # special thanks to mr_wiggles and moghunter for RGSS support
    #
    # *free to use, must give credit, do not post on any other site
    #==============================================================================
     
    module G101_GPLAT
      
    #--------------------------------------------------------------------------
      # * configure settings
      #--------------------------------------------------------------------------
     
      
    GPLAT_DISABLE_SWITCH 3         # switch ID to disable gravity switch
      #
      
    PIXEL_MOVE true                # pixel movement & jump
      
      #SPRITE settings
      
    UP    32                       #default 32 (0 < UP < 64)
      
    DOWN  0                        #default 16 (0 < DOWN <64)
      
    SIDE  32                       #default 32 (0 < SIDE <64)
      
      #SPEED settings
      
    DASH_BUTTON Input::Shift           # dash button
      
    WALK_SPEED 4.8                 # set the walk speed
      
    DASH_SPEED 5.5                 # set the dash speed
      
      #JUMP settings
      
    JUMP_BUTTON Input::Space           # jump button
      
    JUMP_SPRITE "_jump f_10"            # jump graphic character name suffix
      
    JUMP_ANIMATION_ID  0           # animation ID when jump
      
    JUMP_MAX 100                    # power of jump
      
    JUMP_ADD 5                     # height of single jump
      
    JUMP_SOUND ""    # Play Sound when jump
      
    JUMP_VOLUME 70                 # set volume for jump sound
      
    JUMP_PITCH 100                 # set the pitch for jump sound
     
      #AIR JUMP settings
      
    AIR_JUMP_VAR 1                 # variable ID to set value for air jumps
      
    AIR_JUMP_ANIMATION_ID 0        # aniamtion ID when air jump
      
    end
     
    #==============================================================================
    # Game_Player
    #==============================================================================
    class Game_Player Game_Character
      
      
    include G101_GPLAT
                        
      
    #--------------------------------------------------------------------------
      # ● public instance variables
      #--------------------------------------------------------------------------
      
    attr_reader   :event                    
      attr_accessor 
    :move_speed              
      
    #--------------------------------------------------------------------------
      # ● update
      #--------------------------------------------------------------------------
      
    alias :update_original :update
      def update
     
        
    @walk  WALK_SPEED
        
    @dash  DASH_SPEED
        
    @event 4
        
    @dot_m PIXEL_MOVE
     
        
    if @revise_x == nil and @revise_y == nil
          
    @revise_x 0
          
    @revise_y 0
        end
        unless 
    @dot_m
          update_original
          
    return
        
    end
        
    if @move_route_forcing
          last_moving 
    moving?
          
    last_real_x = @real_x
          last_real_y 
    = @real_y
          
    if (@revise_x != or @revise_y != 0) and not jumping? and @move == true
            
    if @revise_x != @real_x - @128 or @revise_y != @real_y - @128
              
    @revise_x = @real_x - @128
              
    @revise_y = @real_y - @128
            end
     
            distance1 
    ** @move_speed
            distance2 
    Math.sqrt(@revise_x ** + @revise_y ** 2)
     
            if 
    distance1 distance2
              
    @real_x = @real_x - @revise_x
              
    @real_y = @real_y - @revise_y
              
    @revise_x 0
              
    @revise_y 0
              anime_update
            
    else
              @
    real_x -= (distance1 * @revise_x distance2).round
              
    @real_y -= (distance1 * @revise_y distance2).round
              
    @revise_x = @real_x - @128
              
    @revise_y = @real_y - @128
              anime_update
            end
          
    else
            
    super
          end
        
    else
          @
    move false
     
          unless moving
    ? or $game_system.map_interpreter.running? or
                 @
    move_route_forcing or $game_temp.message_window_showing
            
    @event_run false
    #-------------------------------------------------------------------------------
          
    case Input.dir8
            when 1
              $game_switches
    [GPLAT_DISABLE_SWITCH] ? move_lower_left_p move_left_p
            when 2
              move_down_p 
    if $game_switches[GPLAT_DISABLE_SWITCH]
            
    when 3
             $game_switches
    [GPLAT_DISABLE_SWITCH] ? move_lower_right_p move_right_p
            when 4
              move_left_p
            when 6
              move_right_p
            when 7
             $game_switches
    [GPLAT_DISABLE_SWITCH] ? move_upper_left_p move_left_p
            when 8
             move_up_p 
    if $game_switches[GPLAT_DISABLE_SWITCH]
            
    when 9
             $game_switches
    [GPLAT_DISABLE_SWITCH] ? move_upper_right_p move_right_p
            end
          end
     
          last_real_x 
    = @real_x
          last_real_y 
    = @real_y
          
    @real_x = @128 + @revise_x
          
    @real_y = @128 + @revise_y
          last_moving 
    moving?
          
    move_on
     
          
    if (last_real_x != @real_x or last_real_y != @real_y)
            @
    move_distance if @move_distance == nil
            
    @move_distance += Math.sqrt((last_real_x - @real_x) ** +
                                          (
    last_real_y - @real_y) ** 2)
            if @
    move_distance >= 128
              
    @move_distance %= 128
              increase_steps
            end
     
            anime_update
          
    else
            @
    pattern 0
          end
        end
     
        
    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
     
        
    if last_moving
          result 
    check_event_trigger_here([1,2])
          if 
    result == true
            
    if (last_real_x 128.0).round != @and
                (
    last_real_y 128.0).round != @y
              
    if @direction == or @direction == 8
                
    if (last_real_x 128.0).round > @x
                  turn_left
                
    else
                  
    turn_right
                end
              
    else
                if (
    last_real_y 128.0).round > @y
                  turn_up
                
    else
                  
    turn_down
                end
              end
            elsif 
    (last_real_x 128.0).round > @x
              turn_left
            elsif 
    (last_real_x 128.0).round < @x
              turn_right
            elsif 
    (last_real_y 128.0).round > @y
              turn_up
            elsif 
    (last_real_y 128.0).round < @y
              turn_down
            end
          end
     
          
    if result == false
            unless $DEBUG 
    and Input.press?(Input::CTRL)
              if @
    encounter_count 0
                
    @encounter_count -= 1
              end
            end
          end
        end
    #-------------------------------------------------------------------------------
          
    unless $game_system.map_interpreter.running? or
                 @
    move_route_forcing or $game_temp.message_window_showing
        
    if Input.press?(JUMP_BUTTON) and not $game_switches[GPLAT_DISABLE_SWITCH]
          @
    twojump if @twojump == and down1(((@128 + @revise_x) / 128.0).round,
              ((@
    128 + @revise_y) / 128.0).round5true)
          if (
    not @apassed) and @twojump <= $game_variables[AIR_JUMP_VAR]
            
            if @
    twojump 0
               $game_player
    .animation_id AIR_JUMP_ANIMATION_ID
             elsif
               $game_player
    .animation_id JUMP_ANIMATION_ID
             end
     
            
    @apassed true
            
    @jumpnow JUMP_MAX
            
    @twojump += 1
     
       $game_system
    .se_play(RPG::AudioFile.new(JUMP_SOUNDJUMP_VOLUMEJUMP_PITCH))
          else
            @
    jumpnow += 3        
          end
        
    else
          @
    apassed false
        end
    #-------------------------------------------------------------------------------
        
    if not $game_switches[GPLAT_DISABLE_SWITCH]
          @
    jumpnow -= 10
          
    if @jumpnow 0
            actor 
    $game_party.actors[0]
            @
    character_name actor.character_name #change graphic back to normal
            
    @jumpnow = [@jumpnow, -JUMP_MAX].max
            
    if not down1(((@128 + @revise_x) / 128.0).round,
              ((@
    128 + @revise_y) / 128.0).round, -@jumpnowtrue)
              @
    jumpnow 0
              
    @twojump 0
            end
          elsif 
    @jumpnow 0
            actor 
    $game_party.actors[0]
            @
    character_name actor.character_name JUMP_SPRITE#change to jump graphic
            
    @jumpnow = [@jumpnowJUMP_MAX].min
            
    if not up1(((@128 + @revise_x) / 128.0).round,
              ((@
    128 + @revise_y) / 128.0).round, @jumpnowtrue)
              @
    jumpnow 0
            end
          end
        end
    end 
    #unless    
        
    if Input.trigger?(Input::C)
          
    check_event_trigger_here([0])
          
    check_event_trigger_there([0,1,2])
        
    end
      end
      
    #--------------------------------------------------------------------------
      # ● Initialize
      #--------------------------------------------------------------------------
      
    def initialize
        
    @jumpnow 0
        
    @twojump 0
        
    @apassed false
        
    @revise_x 0
        
    @revise_y 0
        
    @move == false
        super
      end
      
    #--------------------------------------------------------------------------
      # ● moving?
      #--------------------------------------------------------------------------
      
    def moving?
        
    unless @dot_m
          result 
    super
          
    return result
        end
     
        
    if @move_route_forcing
          
    if @move == false
            
    return false
          end
          super
     
        
    else
          return (@
    != (@real_x 128.0).round or @!= (@real_y 128.0).round)
        
    end
      end
      
    #--------------------------------------------------------------------------
      # ● moving_a?
      #--------------------------------------------------------------------------
      
    def moving_a?
        if @
    move == false
          
    if (@move_route.list[@move_route_index].code <= 14 or
              @
    move_route.list[@move_route_index].code == 25)
            @
    move true
          end
          
    return false
        end
        moving
    ?
      
    end
      
    #--------------------------------------------------------------------------
      # ● update (jump)
      #--------------------------------------------------------------------------
      
    def update_jump
     
        
    @jump_count -= 1
     
        
    @real_x = (@real_x * @jump_count + @128) / (@jump_count 1)
        @
    real_y = (@real_y * @jump_count + @128) / (@jump_count 1)
        if @
    jump_count == 0
          
    @revise_x 0
          
    @revise_y 0
        end
      end
      
    #--------------------------------------------------------------------------
      # ● move_type custom
      #--------------------------------------------------------------------------
      
    def move_type_custom
        unless 
    @dot_m
          super
          
    return
        
    end
     
        
    if jumping? or moving_a?
          return
        
    end
     
        
    while @move_route_index < @move_route.list.size
          command 
    = @move_route.list[@move_route_index]
     
          if 
    command.code == 0
            
    if @move_route.repeat
              
    @move_route_index 0
            end
     
            unless 
    @move_route.repeat
              
    if @move_route_forcing and not @move_route.repeat
                
    @move_route_forcing false
                
    @move_route = @original_move_route
                
    @move_route_index = @original_move_route_index
                
    @original_move_route nil
              end
     
              
    @stop_count 0
            end
            
    return
          
    end
     
          
    if command.code <= 14
     
            
    case command.code
            when 1  
              move_down
            when 2  
              move_left
            when 3  
              move_right
            when 4  
              move_up
            when 5  
              move_lower_left
            when 6  
              move_lower_right
            when 7  
              move_upper_left
            when 8  
              move_upper_right
            when 9  
              move_random
            when 10  
              move_toward_player
            when 11  
              move_away_from_player
            when 12  
              move_forward
            when 13  
              move_backward
            when 14  
              jump
    (command.parameters[0], command.parameters[1])
            
    end
     
            
    if not @move_route.skippable and not moving? and not jumping?
              return
            
    end
            
    @move_route_index += 1
            
    return
          
    end
     
          
    if command.code == 15
            
    @wait_count command.parameters[0] * 1
            
    @move_route_index += 1
            
    return
          
    end
     
          
    if command.code >= 16 and command.code <= 26
     
            
    case command.code
            when 16  
              turn_down
            when 17  
              turn_left
            when 18  
              turn_right
            when 19  
              turn_up
            when 20  
              turn_right_90
            when 21  
              turn_left_90
            when 22  
              turn_180
            when 23  
              turn_right_or_left_90
            when 24  
              turn_random
            when 25  
              turn_toward_player
            when 26  
              turn_away_from_player
            end
            
    @move_route_index += 1
            
    return
          
    end
     
          
    if command.code >= 27
     
            
    case command.code
            when 27  
              $game_switches
    [command.parameters[0]] = true
              $game_map
    .need_refresh true
            when 28  
              $game_switches
    [command.parameters[0]] = false
              $game_map
    .need_refresh true
            when 29  
              
    @move_speed command.parameters[0]
            
    when 30  
              
    @move_frequency command.parameters[0]
            
    when 31  
              
    @walk_anime true
            when 32  
              
    @walk_anime false
            when 33  
              
    @step_anime true
            when 34  
              
    @step_anime false
            when 35  
              
    @direction_fix true
            when 36  
              
    @direction_fix false
            when 37  
              
    @through true
            when 38  
              
    @through false
            when 39  
              
    @always_on_top true
            when 40  
              
    @always_on_top false
            when 41  
              
    @tile_id 0
              
    @character_name command.parameters[0]
              @
    character_hue command.parameters[1]
              if @
    original_direction != command.parameters[2]
                @
    direction command.parameters[2]
                @
    original_direction = @direction
                
    @prelock_direction 0
              end
              
    if @original_pattern != command.parameters[3]
                @
    pattern command.parameters[3]
                @
    original_pattern = @pattern
              end
            when 42  
              
    @opacity command.parameters[0]
            
    when 43  
              
    @blend_type command.parameters[0]
            
    when 44  
              $game_system
    .se_play(command.parameters[0])
            
    when 45  
              result 
    = eval(command.parameters[0])
            
    end
            
    @move_route_index += 1
            
    return
          
    end
        end
      end
      
    #--------------------------------------------------------------------------
      # ● move_down platform
      #--------------------------------------------------------------------------
      
    def move_down_p
        turn_down
        distance 
    ** @move_speed
        down1
    (((@128 + @revise_x) / 128.0).round,
              ((@
    128 + @revise_y) / 128.0).rounddistancetrue)
      
    end
      
    #--------------------------------------------------------------------------
      # ● move_down aaaagq
      #--------------------------------------------------------------------------
      
    def move_down_aaaagq
        distance 
    ** @move_speed
        down1
    (((@128 + @revise_x) / 128.0).round,
              ((@
    128 + @revise_y) / 128.0).rounddistancetrue)
      
    end
      
    #--------------------------------------------------------------------------
      # ● down1
      #--------------------------------------------------------------------------
      
    def down1(xydistancedown false)
        
    result down2(xydistance)
        if 
    result == false
          
    @event_run check_event_trigger_touch(xy+1)
          return 
    result
        end
        
    if @revise_x < -SIDE
          result 
    down2(x1distance4)
          
    result &= down2(1ydistance)
          if 
    result == false
            
    if down
              move_lower_right_p
              
    if @revise_x SIDE
                
    @revise_x SIDE
              end
            end
            
    return result
          end
        elsif 
    @revise_x SIDE
          result 
    down2(x1distance6)
          
    result &= down2(1ydistance)
          if 
    result == false
            
    if down
              move_lower_left_p
              
    if @revise_x < -SIDE
                
    @revise_x = -SIDE
              end
            end
            
    return result
          end
        end
        
    @revise_y += distance
        
    return result
      end
      
    #--------------------------------------------------------------------------
      # ● down2
      #--------------------------------------------------------------------------
      
    def down2(xydistance2)
        if @
    revise_y distance DOWN
          unless passable
    ?(xyd)
            if @
    revise_y DOWN
              
    @revise_y DOWN
            end
            
    return false
          end
        end
        
    return true
      end
      
    #--------------------------------------------------------------------------
      # ● move_left platform
      #--------------------------------------------------------------------------
      
    def move_left_p
        turn_left
        distance 
    ** @move_speed
        left1
    (((@128 + @revise_x) / 128.0).round,
              ((@
    128 + @revise_y) / 128.0).rounddistancetrue)
      
    end
      
    #--------------------------------------------------------------------------
      # ● left1
      #--------------------------------------------------------------------------
      
    def left1(xydistanceleft false)
        
    result left2(xydistance)
        if 
    result == false
          
    @event_run check_event_trigger_touch(x-1y)
          return 
    result
        end
        
    if @revise_y < -UP and $game_switches[GPLAT_DISABLE_SWITCH]
          
    result left2(1ydistance8)
          
    result &= left2(x1distance)
          if 
    result == false
            
    if left
              move_lower_left_p
              
    if @revise_y DOWN
                
    @revise_y DOWN
              end
            end
            
    return result
          end
        elsif 
    @revise_y DOWN and $game_switches[GPLAT_DISABLE_SWITCH]
          
    result left2(1ydistance2)
          
    result &= left2(x1distance)
          if 
    result == false
            
    if left
              move_upper_left_p
              
    if @revise_y < -UP
                
    @revise_y = -UP
              end
            end
            
    return result
          end
        end
        
    @revise_x -= distance
        
    return result
      end
      
    #--------------------------------------------------------------------------
      # ● left2
      #--------------------------------------------------------------------------
      
    def left2(xydistance4)
        if @
    revise_x distance < -SIDE
          unless passable
    ?(xyd)
            if @
    revise_x > -SIDE
              
    @revise_x = -SIDE
            end
            
    return false
          end
        end
        
    return true
      end
      
    #--------------------------------------------------------------------------
      # ● move_right platform
      #--------------------------------------------------------------------------
      
    def move_right_p
          turn_right
        distance 
    ** @move_speed
        right1
    (((@128 + @revise_x) / 128.0).round,
                ((@
    128 + @revise_y) / 128.0).rounddistancetrue)
      
    end
      
    #--------------------------------------------------------------------------
      # ● right1
      #--------------------------------------------------------------------------
      
    def right1(xydistanceright false)
        
    result right2(xydistance)
        if 
    result == false
          
    @event_run check_event_trigger_touch(x+1y)
          return 
    result
        end
        
    if @revise_y < -UP and $game_switches[GPLAT_DISABLE_SWITCH]
          
    result right2(1ydistance8)
          
    result &= right2(x1distance)
          if 
    result == false
            
    if right
              move_lower_right_p
              
    if @revise_y DOWN
                
    @revise_y DOWN
              end
            end
            
    return result
          end
        elsif 
    @revise_y DOWN and $game_switches[GPLAT_DISABLE_SWITCH]
          
    result right2(1ydistance2)
          
    result &= right2(x1distance)
          if 
    result == false
            
    if right
              move_upper_right_p
              
    if @revise_y < -UP
                
    @revise_y = -UP
              end
            end
            
    return result
          end
        end
        
    @revise_x += distance
        
    return result
      end
      
    #--------------------------------------------------------------------------
      # ● right2
      #--------------------------------------------------------------------------
      
    def right2(xydistance6)
        if @
    revise_x distance SIDE
          unless passable
    ?(xyd)
            if @
    revise_x SIDE
              
    @revise_x SIDE
            end
            
    return false
          end
        end
        
    return true
      end
      
    #--------------------------------------------------------------------------
      # ● move_up platform
      #--------------------------------------------------------------------------
      
    def move_up_p
        turn_up
        distance 
    ** @move_speed
        up1
    (((@128 + @revise_x) / 128.0).round,
            ((@
    128 + @revise_y) / 128.0).rounddistancetrue)
      
    end
      
    #--------------------------------------------------------------------------
      # ● move_up_aaaagq
      #--------------------------------------------------------------------------
      
    def move_up_aaaagq
        distance 
    ** @move_speed
        up1
    (((@128 + @revise_x) / 128.0).round,
            ((@
    128 + @revise_y) / 128.0).rounddistancetrue)
      
    end
      
    #--------------------------------------------------------------------------
      # ● up1
      #--------------------------------------------------------------------------
      
    def up1(xydistanceup false)
        
    result up2(xydistance)
        if 
    result == false
          
    @event_run check_event_trigger_touch(xy-1)
          return 
    result
        end
        
    if @revise_x < -SIDE
          result 
    up2(x1distance4)
          
    result &= up2(1ydistance)
          if 
    result == false
            
    if up
              move_upper_right_p
              
    if @revise_x SIDE
                
    @revise_x SIDE
              end
            end
            
    return result
          end
        elsif 
    @revise_x SIDE
          result 
    up2(x1distance6)
          
    result &= up2(1ydistance)
          if 
    result == false
            
    if up
              move_upper_left_p
              
    if @revise_x < -SIDE
                
    @revise_x = -SIDE
              end
            end
            
    return result
          end
        end
        
    @revise_y -= distance
        
    return result
      end
      
    #--------------------------------------------------------------------------
      # ● up2
      #--------------------------------------------------------------------------
      
    def up2(xydistance8)
        if @
    revise_y distance < -UP
          unless passable
    ?(xyd)
            if @
    revise_y > -UP
              
    @revise_y = -UP
            end
            
    return false
          end
        end
        
    return true
      end
      
    #--------------------------------------------------------------------------
      # ● low_left platform
      #--------------------------------------------------------------------------
      
    def move_lower_left_p
        unless 
    @direction_fix
          
    @direction = (@direction == : @direction == : @direction)
        
    end
        distance 
    = (** @move_speed) / Math.sqrt(2)
        if @
    direction == 2
          turn_left unless down1
    (((@128 + @revise_x) / 128.0).round,
                                  ((@
    128 + @revise_y) / 128.0).rounddistance)
          
    turn_down if @event_run
          unless 
    @event_run
            
    if last_move?(@real_x, @real_y2distance)
              
    result check_event_trigger_here([1,2], false)
              if 
    result == true
                
    return
              
    end
            end
            move_on
            
    if @revise_y DOWN and -UP > @revise_y distance
              
    @revise_y DOWN
            end
            turn_down unless left1
    (((@128 + @revise_x) / 128.0).round,
                                  ((@
    128 + @revise_y) / 128.0).rounddistance)
            
    turn_left if @event_run
          end
        
    else
          
    turn_down unless left1(((@128 + @revise_x) / 128.0).round,
                                  ((@
    128 + @revise_y) / 128.0).rounddistance)
          
    turn_left if @event_run
          unless 
    @event_run
            
    if last_move?(@real_x, @real_y4distance)
              
    result check_event_trigger_here([1,2], false)
              if 
    result == true
                
    return
              
    end
            end
            move_on
            
    if  @revise_x distanceSIDE and -SIDE > @revise_x
              
    @revise_x = -SIDE
            end
            turn_left unless down1
    (((@128 + @revise_x) / 128.0).round,
                                  ((@
    128 + @revise_y) / 128.0).rounddistance)
            
    turn_down if @event_run
          end
        end
      end
      
    #--------------------------------------------------------------------------
      # ● low_right platform
      #--------------------------------------------------------------------------
      
    def move_lower_right_p
        unless 
    @direction_fix
          
    @direction = (@direction == : @direction == : @direction)
        
    end
        distance 
    = (** @move_speed) / Math.sqrt(2)
        if @
    direction == 2
          turn_right unless down1
    (((@128 + @revise_x) / 128.0).round,
                                  ((@
    128 + @revise_y) / 128.0).rounddistance)
          
    turn_down if @event_run
          unless 
    @event_run
            
    if last_move?(@real_x, @real_y2distance)
              
    result check_event_trigger_here([1,2], false)
              if 
    result == true
                
    return
              
    end
            end
            move_on
            
    if @revise_y DOWN and -UP > @revise_y distance
              
    @revise_y DOWN
            end
            turn_down unless right1
    (((@128 + @revise_x) / 128.0).round,
                                  ((@
    128 + @revise_y) / 128.0).rounddistance)
            
    turn_right if @event_run
          end
        
    else
          
    turn_down unless right1(((@128 + @revise_x) / 128.0).round,
                                  ((@
    128 + @revise_y) / 128.0).rounddistance)
          
    turn_right if @event_run
          unless 
    @event_run
            
    if last_move?(@real_x, @real_y6distance)
              
    result check_event_trigger_here([1,2], false)
              if 
    result == true
                
    return
              
    end
            end
            move_on
            
    if @revise_x SIDE and -SIDE > @revise_x distance
              
    @revise_x SIDE
            end
            turn_right unless down1
    (((@128 + @revise_x) / 128.0).round,
                                  ((@
    128 + @revise_y) / 128.0).rounddistance)
            
    turn_down if @event_run
          end
        end
      end
      
    #--------------------------------------------------------------------------
      # ● up_left platform
      #--------------------------------------------------------------------------
      
    def move_upper_left_p
        unless 
    @direction_fix
          
    @direction = (@direction == : @direction == : @direction)
        
    end
        distance 
    = (** @move_speed) / Math.sqrt(2)
        if @
    direction == 8
          turn_left unless up1
    (((@128 + @revise_x) / 128.0).round,
                                ((@
    128 + @revise_y) / 128.0).rounddistance)
          
    turn_up if @event_run
          unless 
    @event_run
            
    if last_move?(@real_x, @real_y8distance)
              
    result check_event_trigger_here([1,2], false)
              if 
    result == true
                
    return
              
    end
            end
            move_on
            
    if @revise_y distance DOWN and -UP > @revise_y
              
    @revise_y = -UP
            end
            turn_up unless left1
    (((@128 + @revise_x) / 128.0).round,
                                  ((@
    128 + @revise_y) / 128.0).rounddistance)
            
    turn_left if @event_run
          end
        
    else
          
    turn_up unless left1(((@128 + @revise_x) / 128.0).round,
                                ((@
    128 + @revise_y) / 128.0).rounddistance)
          
    turn_left if @event_run
          unless 
    @event_run
            
    if last_move?(@real_x, @real_y4distance)
              
    result check_event_trigger_here([1,2], false)
              if 
    result == true
                
    return
              
    end
            end
            move_on
            
    if @revise_x SIDE and -SIDE > @revise_x distance
              
    @revise_x SIDE
            end
            turn_left unless up1
    (((@128 + @revise_x) / 128.0).round,
                                  ((@
    128 + @revise_y) / 128.0).rounddistance)
            
    turn_up if @event_run
          end
        end
      end
      
    #--------------------------------------------------------------------------
      # ● up_right platform
      #--------------------------------------------------------------------------
      
    def move_upper_right_p
        unless 
    @direction_fix
          
    @direction = (@direction == : @direction == : @direction)
        
    end
        distance 
    = (** @move_speed) / Math.sqrt(2)
        if @
    direction == 8
          turn_right unless up1
    (((@128 + @revise_x) / 128.0).round,
                                ((@
    128 + @revise_y) / 128.0).rounddistance)
          
    turn_up if @event_run
          unless 
    @event_run
            
    if last_move?(@real_x, @real_y8distance)
              
    result check_event_trigger_here([1,2], false)
              if 
    result == true
                
    return
              
    end
            end
            move_on
            
    if @revise_y distance DOWN and -UP > @revise_y
              
    @revise_y = -UP
            end
            turn_up unless right1
    (((@128 + @revise_x) / 128.0).round,
                                  ((@
    128 + @revise_y) / 128.0).rounddistance)
            
    turn_right if @event_run
          end
        
    else
          
    turn_up unless right1(((@128 + @revise_x) / 128.0).round,
                                ((@
    128 + @revise_y) / 128.0).rounddistance)
          
    turn_right if @event_run
          unless 
    @event_run
            
    if last_move?(@real_x, @real_y6distance)
              
    result check_event_trigger_here([1,2], false)
              if 
    result == true
                
    return
              
    end
            end
            move_on
            
    if @revise_x SIDE and -SIDE > @revise_x distance
              
    @revise_x SIDE
            end
            turn_right unless up1
    (((@128 + @revise_x) / 128.0).round,
                                  ((@
    128 + @revise_y) / 128.0).rounddistance)
            
    turn_up if @event_run
          end
        end
      end
      
    #--------------------------------------------------------------------------
      # ● check event here
      #--------------------------------------------------------------------------
      
    def check_event_trigger_here(triggersrun true)
        
    result false
        
    if $game_system.map_interpreter.running?
          return 
    result
        end
        
    for event in $game_map.events.values
          
    if event.== ((@128 + @revise_x) / 128.0).round and
              
    event.== ((@128 + @revise_y) / 128.0).round and
              
    triggers.include?(event.trigger)
            if 
    not event.jumping? and event.over_trigger?
              if 
    event.list.size 1
                
    if run == true
                  event
    .start
                end
                result 
    true
              end
            end
          end
        end
        
    return result
      end
      
    #--------------------------------------------------------------------------
      # ● move_on
      #--------------------------------------------------------------------------
      
    def move_on
        
    if @< (@+ @revise_y 128.0).round
          
    @+= 1
          
    @revise_y -= 128
        end
        
    if @> (@+ @revise_x 128.0).round
          
    @-= 1
          
    @revise_x += 128
        end
        
    if @< (@+ @revise_x 128.0).round
          
    @+= 1
          
    @revise_x -= 128
        end
        
    if @> (@+ @revise_y 128.0).round
          
    @-= 1
          
    @revise_y += 128
        end
      end
      
    #--------------------------------------------------------------------------
      # ● update (anime)
      #--------------------------------------------------------------------------
      
    def anime_update
        
    if @walk_anime
          
    @anime_count += 1.5
        elsif 
    @step_anime
          
    @anime_count += 1
        end
        
    if @anime_count 18 - @move_speed #@event = 4?
          
    if not @step_anime and @stop_count 0
            
    @pattern = @original_pattern
          
    else
            @
    pattern = (@pattern 1) % 4
          end
          
    @anime_count 0
        end
      end
      
    #--------------------------------------------------------------------------
      # ● moveto (x,y)
      #--------------------------------------------------------------------------
      
    alias :moveto_original :moveto
      def moveto
    (xy)
        @
    revise_x 0
        
    @revise_y 0
        moveto_original
    (xy)
      
    end
      
    #--------------------------------------------------------------------------
      # ● last move?
      #--------------------------------------------------------------------------
      
    def last_move?(xydirectiondistance)
        if 
    direction == or direction == 6
          distance 
    *= -1
        end
        
    if (direction == or direction == 8) and
            (
    128.0).round != ((distance) / 128.0).round
          
    return true
        end
        
    if (direction == or direction == 6) and
            (
    128.0).round != ((distance) / 128.0).round
          
    return true
        end
        
    return false
      end
    end
     
    #==============================================================================
    # Game_Character
    #==============================================================================
     
    class Game_Character
      
        
    include G101_GPLAT
     
      def update_move
        distance 
    ** @move_speed
        
    if @128 != @real_x and @128 != @real_y
          distance 
    /= Math.sqrt(2)
        
    end
        
    if @128 > @real_y
          
    @real_y = [@real_y distance, @128].min
        end
        
    if @128 < @real_x
          
    @real_x = [@real_x distance, @128].max
        end
        
    if @128 > @real_x
          
    @real_x = [@real_x distance, @128].min
        end
        
    if @128 < @real_y
          
    @real_y = [@real_y distance, @128].max
        end
        
    if @walk_anime
          
    @anime_count += 1.5
        elsif 
    @step_anime
          
    @anime_count += 1
        end
      end
    end
     
    #==============================================================================
    # Game_Event
    #==============================================================================
     
    class Game_Event Game_Character
      def start
        
    if @list.size 1
          
    if $game_player.event != 0
            $game_player
    .move_speed $game_player.event
          end
          
    @starting true
        end
      end
    end
    #end of script ^,^ 

    скрипт, конечно багнутый, но вот в чем беда, при создании ивента на движение персонажа стоя (Set Move Route Player: $>Stop Animation ON) ни чего не происходит и прыжок использует всего 1 спрайт ,вместо заданных мной 10, как-то можно это исправить?

  4. #1124
    Хранитель Аватар для Paranoid
    Информация о пользователе
    Регистрация
    22.12.2014
    Сообщений
    2,261
    Записей в дневнике
    30
    Репутация: 21 Добавить или отнять репутацию

    По умолчанию

    Не стал делать отдельную тему потому что не смог заюзать скрипт. Короче, нашел полноценный скрипт на мышь (весь функционал: движение/взаимодействие), насколько я понял подобного здесь не было, скрипт для аси.
    Оригинальная тема.
    Спойлер Сам скрипт:
    #================================================= ===========================
    # SUPER SIMPLE MOUSE SCRIPT
    # v1.10 by Shaz
    #----------------------------------------------------------------------------
    # This is a conversion of the XP Mouse script by Near Fantastica and
    # SephirothSpawn modified by Amaranth Games, to run under VX Ace.
    #----------------------------------------------------------------------------
    # To Install:
    # Copy and paste into a new slot in materials, below all other scripts
    #----------------------------------------------------------------------------
    # To Customize:
    # Add keyword icon index pairs to the ICON hash (below this documentation).
    # Each of the keywords can be used in an event comment to make the mouse
    # cursor change into that icon when hovering over the event.
    #----------------------------------------------------------------------------
    # To Use:
    # Add the following comment to an event page:
    # <mouse icon [x y] [name]>
    # where icon is the keyword from the ICON hash below
    # x and y are the offsets to override player movement (optional)
    # name is the text to display next to the icon when hovering over the event (optional)
    #
    # Examples:
    # <mouse fight>
    # will change the cursor into the 'fight' icon when over the event
    # <mouse touch 0 1>
    # will change the cursor into the 'touch' icon when over the event, and
    # make the player walk to the tile below the event when the mouse button is
    # clicked
    # <mouse talk Gloria>
    # will change the cursor into the 'talk' icon and display the name Gloria
    # <mouse talk 0 2 Henry Smith>
    # will change the cursor into the 'talk' icon and display the name Henry Smith,
    # and when the mouse button is clicked, the player will walk to the tile
    # two below the event (good to use for shops where there's a counter in between)
    #
    # To force pathfinding on the player or an event, simply add a move route with
    # the player or event as the subject, with a Script command, and call
    # find_path(x, y) where x and y are the coordinates of the tile you want to move to
    # Examples:
    # Set Move Route (Player): Script: find_path(5, 8)
    # will make the player find a path to tile 5, 8
    # Set Move Route (This Event): Script: find_path(10, 5)
    # will make the event find a path to tile 10, 5
    #
    # NOTE: The path will be ATTEMPTED. If there is no path TO that exact tile,
    # a path to an adjacent tile will be attempted. If no path is found there
    # either, no movement will occur.
    # If a route is found, the player or event will begin moving towards it. But
    # if their path is blocked while they are moving, movement will be cancelled.
    #----------------------------------------------------------------------------
    # Author's Notes:
    # This script should work with any RTP script.
    # I do not guarantee that it will work with ANY other script (especially anything
    # that overrides player or event movement, such as pixel movement scripts, or
    # custom window scripts).
    #
    # Script OVERWRITES the following methods:
    # Game_Map.setup_starting_map_event
    # Game_Map.setup_autorun_common_event
    #
    # If you have other scripts that ALIAS these methods, this mouse script should
    # be placed above them.
    #----------------------------------------------------------------------------
    # Terms:
    # Use in free and commercial games
    # Credit: Near Fantastica, SephirothSpawn, Amaranth Games, Shaz
    #----------------------------------------------------------------------------
    # Versions:
    # 1.0 - 6 Sept 2013 - initial release
    # 1.02 - 7 Sept 2013 - fixed crash when loading games saved prior to adding script
    # - fixed player gets stuck on impassable area on world map
    # when clicking while leaving air ship
    # 1.03 - 8 Sept 2013 - fixed actor moving to diagonal tile instead of adjacent
    # 1.04 - 10 Sept 2013 - fixed vehicle pathfinding on world map
    # - fixed event trigger when no path found
    # 1.05 - 14 Sept 2013 - tweaked accessing of tilemap offset
    # 1.06 - 3 Nov 2013 - disabled mouse movement when waiting for NPC move route
    # - fixed events not triggering after player finishes walking
    # 1.07 - 6 Nov 2013 - slow down mouse scrolling, and don't loop save files
    # 1.08 - 24 Nov 2013 - cater for YEA Core large resolution with too-small maps
    # - fixed early event activation bug introduced in 1.06
    # - replaced calc of Windows_Selectable boundaries with item_rect
    # - added ability to completely disable mouse
    # 1.09 - 21 Dec 2013 - fixed mouse re-enable when calling common events
    # 1.10 - 6 Apr 2014 - add interaction for top part of > 32pixel high event
    # - activate an event without walking up to it
    # (add <autoactivate> comment at top of event page)
    # - arrow keys override mouse movement when pathfinding
    # - ignore mouse in menus when using keyboard
    # - make player walk to counter opposite shopkeepers
    #================================================= ===========================






    #================================================= ===========================
    # SUPER SIMPLE MOUSE SCRIPT
    # Mouse Sprite
    #================================================= ===========================


    # Add/remove/change icon names here. The icon name is what will be used in the
    # event <mouse ...> command to show a different mouse icon when hovering over
    # the event. These MUST be in lower case here!
    ICON = {'arrow' => 386, 'talk' => 4, 'look' => 3, 'fight' => 116,
    'touch' => 491, 'exit' => 121}
    DEFAULT_ICON = 'arrow'

    class Sprite_Mouse < Sprite
    #--------------------------------------------------------------------------
    # * Initialization
    #--------------------------------------------------------------------------
    def initialize
    super
    self.z = 10100
    self.ox = 4
    update
    @dummy = Bitmap.new(32, 32)
    self.bitmap = Bitmap.new(32, 32)
    @enabled = true
    @ignored = false
    end
    #--------------------------------------------------------------------------
    # * Frame Update
    #--------------------------------------------------------------------------
    def update
    return if !@enabled
    super
    if !SceneManager.scene.nil?
    if !Mouse.position.nil?
    mx, my = *Mouse.position
    if @cursor == DEFAULT_ICON
    self.x = mx unless mx.nil?
    else
    self.x = [mx, Graphics.width - self.bitmap.width].min unless mx.nil?
    end
    self.y = my unless my.nil?
    end
    if @scene != SceneManager.scene.class || Mouse.trigger?
    @scene = SceneManager.scene.class
    set_bitmap
    end
    end
    end
    #--------------------------------------------------------------------------
    # * Set Bitmap
    #--------------------------------------------------------------------------
    def set_bitmap(cursor = DEFAULT_ICON, text = nil)
    if @ignored
    cursor = DEFAULT_ICON
    text = nil
    end

    if @cursor != cursor || @text != text
    @cursor = cursor
    @text = text
    item_cursor = ICON[cursor]
    rect = Rect.new(item_cursor % 16 * 24, item_cursor / 16 * 24, 24, 24)
    if @text.nil?
    self.bitmap = Bitmap.new(24, 32)
    self.bitmap.blt(0, 0, Cache.system('Iconset'), rect)
    else
    w = @dummy.text_size(@text).width
    h = @dummy.font.size
    bitmap = Bitmap.new(26 + w, [32, h+2].max)
    bitmap.font.size = @dummy.font.size
    bitmap.font.shadow = true
    if self.x + 26 + w > Graphics.width
    bitmap.draw_text(0, 0, w, h, @text)
    bitmap.blt(w, 0, Cache.system('Iconset'), rect)
    else
    bitmap.blt(0, 0, Cache.system('Iconset'), rect)
    bitmap.draw_text(26, 0, w, h, @text)
    end
    self.bitmap = bitmap
    end
    end
    end
    #--------------------------------------------------------------------------
    # * Update Event Cursors
    #--------------------------------------------------------------------------
    def update_event_cursors
    # Remove mouse icon and text if we're off the grid
    if Mouse.grid.nil?
    set_bitmap
    return
    end
    # Set cursor and text according to event
    x, y = *Mouse.grid
    event = $game_map.lowest_mouse_event_xy(x, y)
    unless event.nil? && y < 410
    if !event.mouse_icon.nil? || !event.mouse_text.nil?
    set_bitmap(event.mouse_icon, event.mouse_text)
    return
    end
    end
    # default bitmap if not over an event
    set_bitmap
    end
    #--------------------------------------------------------------------------
    # * Enable Mouse
    #--------------------------------------------------------------------------
    def enabled=(value)
    @enabled = value
    self.visible = value
    end
    #--------------------------------------------------------------------------
    # * Mouse Enabled?
    #--------------------------------------------------------------------------
    def enabled?
    @enabled
    end
    #--------------------------------------------------------------------------
    # * Ignore Mouse
    #--------------------------------------------------------------------------
    def ignored=(value)
    @ignored = value
    end
    #--------------------------------------------------------------------------
    # * Mouse Ignored?
    #--------------------------------------------------------------------------
    def ignored?
    @ignored
    end
    end

    $mouse = Sprite_Mouse.new






    #================================================= ===========================
    # SUPER SIMPLE MOUSE SCRIPT
    # Mouse Module
    #================================================= ===========================


    #================================================= =============================
    # ** Mouse Module
    #------------------------------------------------------------------------------
    # by Near Fantastica and SephirothSpawn
    # adapted and converted to VX Ace by Shaz
    #================================================= =============================
    module Mouse
    #--------------------------------------------------------------------------
    # * Mouse to Input Triggers
    # key => Input::KeyCONSTANT (key: 0 - left, 1 - middle, 2 - right)
    #--------------------------------------------------------------------------
    Mouse_to_Input_Triggers = {0 => Input::C, 1 => Input::B, 2 => Input::A}
    #--------------------------------------------------------------------------
    # * API Declarations
    #--------------------------------------------------------------------------
    GAKS = Win32API.new('user32', 'GetAsyncKeyState', 'i', 'i')
    GSM = Win32API.new('user32', 'GetSystemMetrics', 'i', 'i')
    Cursor_Pos = Win32API.new('user32', 'GetCursorPos', 'p', 'i')
    Scr2cli = Win32API.new('user32', 'ScreenToClient', %w(l p), 'i')
    Client_rect = Win32API.new('user32', 'GetClientRect', %w(l p), 'i')
    Findwindow = Win32API.new('user32', 'FindWindowA', %w(p p), 'l')
    Readini = Win32API.new('kernel32', 'GetPrivateProfileStringA', %w(p p p p l p), 'l')
    ShowCursor = Win32API.new('user32', 'ShowCursor', 'i', 'l')
    #--------------------------------------------------------------------------
    # * Module Variables
    #--------------------------------------------------------------------------
    @triggers = [[0, 1], [0, 2], [0, 4]]
    @old_pos = 0
    @pos_i = 0
    @sys_cursor_visible = false
    #--------------------------------------------------------------------------
    # * Mouse Grid Position
    #--------------------------------------------------------------------------
    def self.grid
    return nil if @pos.nil?
    mx, my = SceneManager.scene.instance_variable_get(:@sprites et).tilemap_offset
    x = (@pos[0] + mx) / 32
    y = (@pos[1] + my) / 32
    return [x, y]
    end
    #--------------------------------------------------------------------------
    # * Mouse Position
    #--------------------------------------------------------------------------
    def self.position
    return @pos.nil? ? [0, 0] : @pos
    end
    #--------------------------------------------------------------------------
    # * Mouse Global Position
    #--------------------------------------------------------------------------
    def self.global_pos
    pos = [0, 0].pack('ll')
    return Cursor_Pos.call(pos) == 0 ? nil : pos.unpack('ll')
    end
    #--------------------------------------------------------------------------
    # * Screen to Client
    #--------------------------------------------------------------------------
    def self.screen_to_client(x=0, y=0)
    pos = [x, y].pack('ll')
    return Scr2cli.call(self.hwnd, pos) == 0 ? nil : pos.unpack('ll')
    end
    #--------------------------------------------------------------------------
    # * Mouse Position
    #--------------------------------------------------------------------------
    def self.pos
    gx, gy = global_pos
    x, y = screen_to_client(gx, gy)

    # Test boundaries
    begin
    if (x >= 0 && y >= 0 && x <= Graphics.width && y <= Graphics.height)
    return x, y
    else
    return -20, -20
    end
    rescue
    return 0, 0
    end
    end
    #--------------------------------------------------------------------------
    # * Update Mouse Position
    #--------------------------------------------------------------------------
    def self.update
    old_pos = @pos
    @pos = self.pos

    # Has mouse been moved?
    if old_pos != @pos
    Input.method = :mouse
    end

    # Which mouse to show - custom, or system?
    if $mouse.enabled? == @sys_cursor_visible
    @sys_cursor_visible = !@sys_cursor_visible
    ShowCursor.call(@sys_cursor_visible ? 1 : 0)
    end

    return if !$mouse.enabled?

    # Leaving / Entering Range?
    if old_pos != [-20, -20] && @pos == [-20, -20] # leaving range
    ShowCursor.call(1)
    elsif old_pos == [-20, -20] && @pos != [-20, -20] # entering range
    ShowCursor.call(0)
    end

    # Update Triggers
    for i in @triggers
    n = GAKS.call(i[1])
    if [0, 1].include?(n)
    i[0] = (i[0] > 0 ? i[0] * -1 : 0)
    else
    i[0] = (i[0] > 0 ? i[0] + 1 : 1)
    end
    end
    end
    #--------------------------------------------------------------------------
    # * Trigger?
    # id : 0:Left, 1:Right, 2:Center
    #--------------------------------------------------------------------------
    def self.trigger?(id = 0)
    if pos != [-20, -20]
    return @triggers[id][0] == 1
    end
    return false
    end
    #--------------------------------------------------------------------------
    # * Repeat?
    # id : 0:Left, 1:Right, 2:Center
    #--------------------------------------------------------------------------
    def self.repeat?(id = 0)
    return @triggers[id][0] > 0 && @triggers[id][0] % 5 == 1
    end
    #--------------------------------------------------------------------------
    # * Hwnd
    #--------------------------------------------------------------------------
    def self.hwnd
    if @hwnd.nil?
    title = "\0" * 256
    Readini.call('Game', 'Title', '', title, 255, '.\\Game.ini')
    title.delete!("\0")
    @hwnd = Findwindow.call('RGSS Player', title)
    ShowCursor.call(0)
    end
    return @hwnd
    end
    #--------------------------------------------------------------------------
    # * Client Size
    #--------------------------------------------------------------------------
    def self.client_size
    rect = [0, 0, 0, 0].pack('l4')
    Client_rect.call(self.hwnd, rect)
    return rect.unpack('l4')[2..3]
    end
    end






    #================================================= ===========================
    # SUPER SIMPLE MOUSE SCRIPT
    # Input
    #================================================= ===========================


    class << Input
    #--------------------------------------------------------------------------
    # * Public Instance Variables
    #--------------------------------------------------------------------------
    attr_accessor :method
    #--------------------------------------------------------------------------
    # * Alias Listings
    #--------------------------------------------------------------------------
    alias :seph_mouse_input_update :update
    alias :seph_mouse_input_trigger? :trigger?
    alias :seph_mouse_input_repeat? :repeat?
    #--------------------------------------------------------------------------
    # * Frame Update
    #--------------------------------------------------------------------------
    def update
    $mouse.update
    Mouse.update
    seph_mouse_input_update
    # Are we using the mouse or the keyboard?
    @method = :keyboard if dir4 != 0 || dir8 != 0
    end
    #--------------------------------------------------------------------------
    # * Trigger? Test
    #--------------------------------------------------------------------------
    def trigger?(constant)
    return true if seph_mouse_input_trigger?(constant)
    if $mouse.enabled? && !Mouse.pos.nil?
    if Mouse::Mouse_to_Input_Triggers.has_value?(constant )
    return true if Mouse.trigger?(Mouse::Mouse_to_Input_Triggers.inde x(constant))
    end
    end
    return false
    end
    #--------------------------------------------------------------------------
    # * Repeat? Test
    #--------------------------------------------------------------------------
    def repeat?(constant)
    return true if seph_mouse_input_repeat?(constant)
    if $mouse.enabled? && !Mouse.pos.nil?
    if Mouse::Mouse_to_Input_Triggers.has_value?(constant )
    return true if Mouse.repeat?(Mouse::Mouse_to_Input_Triggers.index (constant))
    end
    end
    return false
    end
    end






    #================================================= ===========================
    # SUPER SIMPLE MOUSE SCRIPT
    # Map
    #================================================= ===========================


    class Spriteset_Map
    #--------------------------------------------------------------------------
    # * Tilemap Offset
    #--------------------------------------------------------------------------
    def tilemap_offset
    if $imported && $imported["YEA-CoreEngine"]
    [@tilemap.ox - @viewport1.rect.x, @tilemap.oy - @viewport1.rect.y]
    else
    [@tilemap.ox, @tilemap.oy]
    end
    end
    end

    class Game_Map
    #--------------------------------------------------------------------------
    # * Detect/Set Up Starting Map Event
    #--------------------------------------------------------------------------
    def setup_starting_map_event
    event = @events.values.find {|event| event.starting }
    event.clear_starting_flag if event
    @interpreter.setup(event.list, event.id, event.trigger_in?([0,1,2,3])) if event
    event
    end
    #--------------------------------------------------------------------------
    # * Detect/Set Up Autorun Common Event
    #--------------------------------------------------------------------------
    def setup_autorun_common_event
    event = $data_common_events.find do |event|
    event && event.autorun? && $game_switches[event.switch_id]
    end
    @interpreter.setup(event.list, 0, true) if event
    event
    end
    #--------------------------------------------------------------------------
    # * Get ID of Lowest Mouse-enabled Event at Designated Coordinates
    #--------------------------------------------------------------------------
    def lowest_mouse_event_xy(x, y)
    list = events_xy(x, y) + events_xy(x, y+1)
    list.sort! {|a, b| b.y - a.y}
    evt = nil
    list.each do |event|
    if (event.pos?(x, y) || (event.pos?(x, y+1) && event.height > 32)) &&
    (evt.nil? || event.y > evt.y)
    evt = event
    break
    end
    end
    return evt
    end
    end

    class Scene_Map
    #--------------------------------------------------------------------------
    # * Frame Update
    #--------------------------------------------------------------------------
    alias shaz_mouse_scene_map_update update
    def update
    $mouse.update_event_cursors
    shaz_mouse_scene_map_update
    end
    end






    #================================================= ===========================
    # SUPER SIMPLE MOUSE SCRIPT
    # Event
    #================================================= ===========================


    module RPG
    class Event
    class Page
    #--------------------------------------------------------------------
    # * Public Instance Variables
    #--------------------------------------------------------------------
    attr_reader :mouse_icon
    attr_reader :mouse_text
    attr_reader :mouse_position
    attr_reader :mouse_autoactivate
    #--------------------------------------------------------------------
    # * Build Stats
    #--------------------------------------------------------------------
    def build_stats
    # Mouse icons (icon mandatory, others optional)
    # <mouse icon destx desty name>
    @mouse_icon = nil
    @mouse_text = nil
    @mouse_position = [0, 0]
    @mouse_autoactivate = false
    # look for mouse instructions
    list.each do |command|
    if [108, 408].include?(command.code)
    comment = command.parameters[0]
    case comment
    when /<mouse/i
    params = /<mouse (.*)>/i.match(comment)[1].split(' ')
    @mouse_icon = params.shift
    if params.size > 1 && params[0] =~ /\d+/ && params[1] =~ /\d+/
    @mouse_position = [params.shift.to_i, params.shift.to_i]
    end
    if params.size > 0
    @mouse_text = params.join(' ')
    end
    when /<autoactivate>/
    @mouse_autoactivate = true
    end
    end #if
    end #do
    end #def
    end
    end
    end

    class Game_Event < Game_Character
    #--------------------------------------------------------------------------
    # * Public Instance Variables
    #--------------------------------------------------------------------------
    attr_reader :mouse_icon
    attr_reader :mouse_text
    attr_reader :mouse_position
    attr_reader :mouse_autoactivate
    #--------------------------------------------------------------------------
    # * Start Event
    #--------------------------------------------------------------------------
    alias shaz_mouse_game_event_start start
    def start
    $game_player.start_event(@id) if !empty?
    shaz_mouse_game_event_start
    end
    #--------------------------------------------------------------------------
    # * Clear Event Page Settings
    #--------------------------------------------------------------------------
    alias shaz_mouse_game_event_clear_page_settings clear_page_settings
    def clear_page_settings
    shaz_mouse_game_event_clear_page_settings
    @mouse_icon = nil
    @mouse_text = nil
    @mouse_position = [0, 0]
    @mouse_autoactivate = false
    @height = 0
    end
    #--------------------------------------------------------------------------
    # * Set Up Event Page Settings
    #--------------------------------------------------------------------------
    alias shaz_mouse_game_event_setup_page_settings setup_page_settings
    def setup_page_settings
    shaz_mouse_game_event_setup_page_settings
    @page.build_stats
    @mouse_icon = @page.mouse_icon
    @mouse_text = @page.mouse_text
    @mouse_position = @page.mouse_position
    @mouse_autoactivate = @page.mouse_autoactivate
    set_size
    end
    end






    #================================================= ===========================
    # SUPER SIMPLE MOUSE SCRIPT
    # Character
    #================================================= ===========================


    class Game_CharacterBase
    attr_reader :height # Height of character bitmap
    #--------------------------------------------------------------------------
    # * Initialize Public Member Variables
    #--------------------------------------------------------------------------
    alias shaz_mouse_game_characterbase_init_public_members init_public_members
    def init_public_members
    shaz_mouse_game_characterbase_init_public_members
    @height = 0
    end
    #--------------------------------------------------------------------------
    # * Change Graphics
    # character_name : new character graphic filename
    # character_index : new character graphic index
    #--------------------------------------------------------------------------
    alias shaz_mouse_game_characterbase_set_graphic set_graphic
    def set_graphic(character_name, character_index)
    shaz_mouse_game_characterbase_set_graphic(characte r_name, character_index)
    set_size
    end
    #--------------------------------------------------------------------------
    # * Set character width/height size
    #--------------------------------------------------------------------------
    def set_size
    bw = Cache.character(@character_name).width
    bh = Cache.character(@character_name).height
    sign = @character_name[/^[\!\$]./]
    if sign && sign.include?('$')
    @width = bw / 3
    @height = bh / 4
    else
    @width = bw / 12
    @height = bh / 8
    end
    end
    #--------------------------------------------------------------------------
    # * Detect Collision with Event
    #--------------------------------------------------------------------------
    def collide_with_events?(x, y)
    $game_map.events_xy_nt(x, y).any? do |event|
    self != event && (event.normal_priority? || self.is_a?(Game_Event))
    end
    end
    #--------------------------------------------------------------------------
    # * Detect Collision with Vehicle
    #--------------------------------------------------------------------------
    def collide_with_vehicles?(x, y)
    !self.is_a?(Game_Player) && ($game_map.boat.pos_nt?(x, y) || $game_map.ship.pos_nt?(x, y))
    end
    #--------------------------------------------------------------------------
    # * Frame Update
    #--------------------------------------------------------------------------
    alias shaz_mouse_game_characterbase_update update
    def update
    run_path if @runpath
    shaz_mouse_game_characterbase_update
    end
    #--------------------------------------------------------------------------
    # * Run Path
    #--------------------------------------------------------------------------
    def run_path
    return if moving?
    @step = @map.nil? || @map[@x, @y].nil? ? 0 : @map[@x, @y] - 1
    if @step < 1
    clear_path
    else
    x, y = @x, @y
    dirs = []
    dirs.push(6) if @map[@x+1, @y] == @step && passable?(@x, @y, 6)
    dirs.push(2) if @map[@x, @y+1] == @step && passable?(@x, @y, 2)
    dirs.push(4) if @map[@x-1, @y] == @step && passable?(@x, @y, 4)
    dirs.push(8) if @map[@x, @y-1] == @step && passable?(@x, @y, 8)
    while dirs.size > 0
    dir = dirs.delete_at(rand(dirs.size))
    move_straight(dir)
    break if x != @x || y != @y
    end
    # clear the path if we couldn't move
    clear_path if x == @x && y == @y
    end
    end
    #--------------------------------------------------------------------------
    # * Find Path
    #--------------------------------------------------------------------------
    def find_path(x, y)
    sx, sy = @x, @y
    @tx, @ty = x, y
    result = setup_map(sx, sy)
    @runpath = result[0]
    @map = result[1]
    @map[sx, sy] = result[2] if result[2] != nil
    end
    #--------------------------------------------------------------------------
    # * Clear Path
    #--------------------------------------------------------------------------
    def clear_path
    @map = nil
    @runpath = false
    end
    #--------------------------------------------------------------------------
    # * Setup Map
    #--------------------------------------------------------------------------
    def setup_map(sx, sy)
    map = Table.new($game_map.width, $game_map.height)
    update_counter = 0
    map[@tx, @ty] = 1
    old_positions = [[@tx, @ty]]
    new_positions = []

    # if tile is impassable, but CAN move to adjacent tiles, use the adjacent tiles instead
    if (!passable?(@tx, @ty, 2) && !passable?(@tx, @ty, 4) &&
    !passable?(@tx, @ty, 6) && !passable?(@tx, @ty, 8)) ||
    $game_map.events_xy_nt(@tx, @ty).any? { |evt| evt.normal_priority? && evt != self }
    old_positions = []

    # Can we move from the destination tile in any direction?
    if map_passable?(@tx, @ty, 2)
    map[@tx, @ty+1] = 1
    old_positions.push([@tx, @ty+1])
    end
    if map_passable?(@tx, @ty, 8)
    map[@tx, @ty-1] = 1
    old_positions.push([@tx, @ty-1])
    end
    if map_passable?(@tx, @ty, 4)
    map[@tx-1, @ty] = 1
    old_positions.push([@tx-1, @ty])
    end
    if map_passable?(@tx, @ty, 6)
    map[@tx+1, @ty] = 1
    old_positions.push([@tx+1, @ty])
    end

    # If not, can we at least move up to the destination tile?
    if old_positions.size == 0
    if map_passable?(@tx-1,@ty,6)
    map[@tx-1,@ty] = 1
    old_positions.push([@tx-1,@ty])
    end
    if map_passable?(@tx+1,@ty,4)
    map[@tx+1,@ty] = 1
    old_positions.push([@tx+1,@ty])
    end
    if map_passable?(@tx,@ty-1,2)
    map[@tx,@ty-1] = 1
    old_positions.push([@tx,@ty-1])
    end
    if map_passable?(@tx,@ty+1,8)
    map[@tx,@ty+1] = 1
    old_positions.push([@tx,@ty+1])
    end
    end
    end

    # If there are any counters, can we move to the tile on the other side?
    if map_passable?(@tx-2,@ty,6) && $game_map.counter?(@tx-1,@ty)
    map[@tx-2,@ty] = 1
    old_positions.push([@tx-2,@ty])
    end
    if map_passable?(@tx+2,@ty,4) && $game_map.counter?(@tx+1,@ty)
    map[@tx+2,@ty] = 1
    old_positions.push([@tx+2,@ty])
    end
    if map_passable?(@tx,@ty-2,2) && $game_map.counter?(@tx,@ty-1)
    map[@tx,@ty-2] = 1
    old_positions.push([@tx,@ty-2])
    end
    if map_passable?(@tx,@ty+2,2) && $game_map.counter?(@tx,@ty+1)
    map[@tx,@ty+2] = 1
    old_positions.push([@tx,@ty+2])
    end


    depth = 2
    depth.upto(100) { |step|
    break if old_positions[0].nil?
    @step = step
    loop do
    break if old_positions[0].nil?
    x, y = old_positions.shift
    return [true, map, @step-1] if x == sx && y == sy
    if map[x, y + 1] == 0 && passable?(x, y, 2)
    map[x, y + 1] = @step
    new_positions.push([x, y + 1])
    end
    if map[x - 1, y] == 0 && passable?(x, y, 4)
    map[x - 1, y] = @step
    new_positions.push([x - 1, y])
    end
    if map[x + 1, y] == 0 && passable?(x, y, 6)
    map[x + 1, y] = @step
    new_positions.push([x + 1, y])
    end
    if map[x, y - 1] == 0 && passable?(x, y, 8)
    map[x, y - 1] = @step
    new_positions.push([x, y - 1])
    end
    # Update graphics? (to reduce lag)
    update_counter += 1
    if update_counter > 50
    Graphics.update
    update_counter = 0
    end
    end
    old_positions = new_positions
    new_positions = []
    }
    return [false, nil, nil]
    end
    end

    class Game_Character < Game_CharacterBase
    #--------------------------------------------------------------------------
    # * Force Move Route
    #--------------------------------------------------------------------------
    alias shaz_mouse_game_character_force_move_route force_move_route
    def force_move_route(move_route)
    clear_path
    shaz_mouse_game_character_force_move_route(move_ro ute)
    end
    end






    #================================================= ===========================
    # SUPER SIMPLE MOUSE SCRIPT
    # Player
    #================================================= ===========================


    class Game_Player < Game_Character
    #--------------------------------------------------------------------------
    # * Trigger Map Event
    # triggers : Trigger array
    # normal : Is priority set to [Same as Characters] ?
    #--------------------------------------------------------------------------
    alias shaz_mouse_game_player_start_map_event start_map_event
    def start_map_event(x, y, triggers, normal)
    @started_events = []
    shaz_mouse_game_player_start_map_event(x, y, triggers, normal)
    end
    #--------------------------------------------------------------------------
    # * Start Event
    #--------------------------------------------------------------------------
    def start_event(event_id)
    @started_events = [] if @started_events.nil?
    @started_events.push(event_id)
    end
    #--------------------------------------------------------------------------
    # * Processing of Movement via Input from Directional Buttons
    #--------------------------------------------------------------------------
    alias shaz_mouse_game_player_move_by_input move_by_input
    def move_by_input
    if Input.dir4 > 0
    clear_path
    shaz_mouse_game_player_move_by_input
    else
    # Move by mouse input
    if !$game_message.busy? && !$game_message.visible && !@move_route_forcing &&
    !@vehicle_getting_on && !@vehicle_getting_off &&
    Mouse.trigger?(0) && !Mouse.grid.nil? && !$mouse.ignored?
    mx, my = *Mouse.grid
    # turn in direction
    if (@x - mx).abs >= (@y - my).abs
    set_direction(@x > mx ? 4 : 6)
    else
    set_direction(@y > my ? 8 : 2)
    end
    # find path
    @event = $game_map.lowest_mouse_event_xy(mx, my)
    if @event.nil?
    find_path(mx, my)
    elsif @event.mouse_autoactivate
    @event.start
    @started_events = []
    clear_path
    else
    find_path(@event.x + @event.mouse_position[0],
    @event.y + @event.mouse_position[1])
    end
    end
    end
    end
    #--------------------------------------------------------------------------
    # * Frame Update
    #--------------------------------------------------------------------------
    alias shaz_mouse_game_player_update update
    def update
    shaz_mouse_game_player_update
    update_pathfinding if !@event.nil? && !moving?
    end
    #--------------------------------------------------------------------------
    # * Check event after pathfinding
    #--------------------------------------------------------------------------
    def update_pathfinding
    if @map.nil? || @map[@x, @y] <= 1
    dir = @x < @event.x ? 6 : @x > @event.x ? 4 : @y < @event.y ? 2 : @y > @event.y ? 8 : 0
    # Face event and trigger it (only if not triggered by start_map_event)
    turn_toward_character(@event) if !@event.pos?(@x, @y)
    if !@started_events.include?(@event.id) && !@map.nil? && !in_airship?
    @event.start
    @started_events = []
    end
    clear_path
    end
    end
    #--------------------------------------------------------------------------
    # * Clear Path
    #--------------------------------------------------------------------------
    def clear_path
    @event = nil
    super
    end
    end






    #================================================= ===========================
    # SUPER SIMPLE MOUSE SCRIPT
    # Interpreter
    #================================================= ===========================


    class Game_Interpreter
    #--------------------------------------------------------------------------
    # * Event Setup
    #--------------------------------------------------------------------------
    alias shaz_mouse_game_interpreter_setup setup
    def setup(list, event_id = 0, lock_player = false)
    shaz_mouse_game_interpreter_setup(list, event_id)
    @lock_player = lock_player
    end
    #--------------------------------------------------------------------------
    # * Execute
    #--------------------------------------------------------------------------
    alias shaz_mouse_game_interpreter_run run
    def run
    $mouse.ignored = true if @lock_player
    shaz_mouse_game_interpreter_run
    $mouse.ignored = false if @lock_player
    end
    end






    #================================================= ===========================
    # SUPER SIMPLE MOUSE SCRIPT
    # Windows
    #================================================= ===========================


    class Window_Selectable < Window_Base
    #--------------------------------------------------------------------------
    # * Frame Update
    #--------------------------------------------------------------------------
    alias shaz_mouse_window_selectable_update update
    def update
    shaz_mouse_window_selectable_update
    process_mouse_handling if Input.method == :mouse
    end
    #--------------------------------------------------------------------------
    # * Mouse Movement Processing
    #--------------------------------------------------------------------------
    def process_mouse_handling
    return unless $mouse.enabled? && cursor_movable?
    # Add a delay to prevent too-fast scrolling
    @delay = @delay ? @delay + 1 : 0
    return if @delay % 3 > 0

    mx, my = *Mouse.position
    vx = self.viewport ? self.x - self.viewport.ox + self.viewport.rect.x : self.x
    vy = self.viewport ? self.y - self.viewport.oy + self.viewport.rect.y : self.y
    if mx.between?(vx, vx + self.width) &&
    my.between?(vy, vy + self.height)
    mx -= vx
    mx -= padding
    my -= vy
    my -= padding
    my += oy
    for i in 0 ... item_max
    rect = item_rect(i)
    if mx.between?(rect.x, rect.x + rect.width) &&
    my.between?(rect.y, rect.y + rect.height)
    last_index = @index
    select(i)
    if @index != last_index
    Sound.play_cursor
    end
    break
    end
    end
    end
    end
    end

    class Window_NameInput < Window_Selectable
    #--------------------------------------------------------------------------
    # * Mouse Movement Processing
    #--------------------------------------------------------------------------
    def process_mouse_handling
    return unless $mouse.enabled?
    # Add a delay to prevent too-fast scrolling
    @delay = @delay ? @delay + 1 : 0
    return if @delay % 3 > 0

    mx, my = *Mouse.position
    vx = (self.viewport ? self.x - self.viewport.ox + self.viewport.rect.x : self.x) + padding
    vy = (self.viewport ? self.y - self.viewport.oy + self.viewport.rect.y : self.y) + padding
    if mx.between?(vx, vx + self.width - padding * 2) &&
    my.between?(vy, vy + self.height - padding * 2)
    mx -= vx
    my -= vy
    x = (mx > 5*32+16 ? mx-16 : mx) / 32
    y = my / line_height
    last_index = @index
    @index = y * 10 + x
    Sound.play_cursor if @index != last_index
    end
    end
    end

    class Scene_File < Scene_MenuBase
    #--------------------------------------------------------------------------
    # * Update Cursor
    #--------------------------------------------------------------------------
    alias shaz_mouse_scene_file_update_cursor update_cursor
    def update_cursor
    shaz_mouse_scene_file_update_cursor
    process_mouse_handling if Input.method == :mouse
    end
    #--------------------------------------------------------------------------
    # * Mouse Movement Processing
    #--------------------------------------------------------------------------
    def process_mouse_handling
    return unless $mouse.enabled?
    # Add a delay to prevent too-fast scrolling
    @delay = @delay ? @delay + 1 : 0
    return if @delay % 3 > 0

    mx, my = *Mouse.position
    vx = @savefile_viewport.ox + mx
    vy = @savefile_viewport.oy + my
    last_index = @index
    new_index = vy / savefile_height
    if @index != new_index
    if new_index > @index
    cursor_down(false)
    else
    cursor_up(false)
    end
    Sound.play_cursor
    @savefile_windows[last_index].selected = false
    @savefile_windows[@index].selected = true
    end
    end
    end

    Хотелось бы чтобы кто-нибудь разобрался и перевел комментарии, для нубов. Если скрипт уже имеется, то прошу ткнуть меня носом.
    Лицензионный VX Ace. Спасибо Петр.

    2 года мукеризма в пустую. Вперед в прошлое

  5. #1125
    Маститый Аватар для HopeBree
    Информация о пользователе
    Регистрация
    28.03.2013
    Сообщений
    1,184
    Записей в дневнике
    6
    Репутация: 38 Добавить или отнять репутацию

    По умолчанию

    PHP код:
      def draw_actor_biography
        fmt 
    YEA::STATUS::BIOGRAPHY_NICKNAME_TEXT
        text 
    sprintf(fmt, @actor.name, @actor.nickname)
        
    contents.font.size YEA::STATUS::BIOGRAPHY_NICKNAME_SIZE
        draw_text
    (00contents.widthline_height*2text1)
        
    reset_font_settings
        draw_text_ex
    (24line_height*2, @actor.description)
      
    end 
    как-то можно в отрывке этого кода, изменить шрифт только к никнейму?

    upd: пошел по сложному пути, объединил 2 шрифта
    сделал как хотел и все работает :3
    Последний раз редактировалось HopeBree; 07.07.2015 в 21:38.

  6. #1126
    Познающий Аватар для 100500
    Информация о пользователе
    Регистрация
    22.05.2011
    Сообщений
    323
    Записей в дневнике
    14
    Репутация: 19 Добавить или отнять репутацию

    По умолчанию

    Нужна помощь по RGSS3. Вопрос следующий: возможно ли как-то выключить все локальные переключатели сразу у нескольких событий? У меня их на карте около 50, и выключать для каждого события по отдельности по два переключателя очень долго и муторно.

  7. #1127
    Супер-модератор Аватар для peter8031983
    Информация о пользователе
    Регистрация
    24.04.2014
    Адрес
    Краснодар
    Сообщений
    1,886
    Записей в дневнике
    4
    Репутация: 68 Добавить или отнять репутацию

    По умолчанию

    Цитата Сообщение от 100500 Посмотреть сообщение
    Нужна помощь по RGSS3. Вопрос следующий: возможно ли как-то выключить все локальные переключатели сразу у нескольких событий? У меня их на карте около 50, и выключать для каждого события по отдельности по два переключателя очень долго и муторно.
    Можно через ID события.
    Вопрос другой...
    А на эти вкладки события не проще повесить общий переключатель?

  8. #1128
    Познающий Аватар для 100500
    Информация о пользователе
    Регистрация
    22.05.2011
    Сообщений
    323
    Записей в дневнике
    14
    Репутация: 19 Добавить или отнять репутацию

    По умолчанию

    Вопрос другой...
    А на эти вкладки события не проще повесить общий переключатель?
    А это как? Мне, честно говоря, непонятно.

  9. #1129
    Супер-модератор Аватар для peter8031983
    Информация о пользователе
    Регистрация
    24.04.2014
    Адрес
    Краснодар
    Сообщений
    1,886
    Записей в дневнике
    4
    Репутация: 68 Добавить или отнять репутацию

    По умолчанию

    Цитата Сообщение от 100500 Посмотреть сообщение
    А это как? Мне, честно говоря, непонятно.
    Ладно, забей.
    Вот.
    Вкл/Выключить все лок.свитчи А на карте.
    И не нужно быть скриптером...

  10. #1130
    Познающий Аватар для 100500
    Информация о пользователе
    Регистрация
    22.05.2011
    Сообщений
    323
    Записей в дневнике
    14
    Репутация: 19 Добавить или отнять репутацию

    По умолчанию

    peter8031983, а вот так вообще понятно и замечательно, спасибо.

Страница 113 из 143 ПерваяПервая ... 1363103111112113114115123 ... ПоследняяПоследняя

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

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

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

Метки этой темы

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

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

Ваши права

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