Страница 448 из 643 ПерваяПервая ... 348398438446447448449450458498548 ... ПоследняяПоследняя
Показано с 4,471 по 4,480 из 6423

Тема: Общие вопросы

  1. #4471

    По умолчанию Как вывести цифры на экран

    Задача следующая :
    Нужно выводить цифры на экран прямо в зависимости от количества определенных предметов.
    Примерно так было в Heroes of Might and Magic 3

  2. #4472

    По умолчанию

    Цитата Сообщение от MaxRiper Посмотреть сообщение
    Задача следующая :
    Нужно выводить цифры на экран прямо в зависимости от количества определенных предметов.
    Примерно так было в Heroes of Might and Magic 3
    герои мне ещё не приходилась играть.

  3. #4473

    По умолчанию

    Цитата Сообщение от traveler Посмотреть сообщение
    герои мне ещё не приходилась играть.
    Лол, настоятельно советую поиграть, скорее всего понравится, да и графика там далеко не майнкрафт, все красочно и детально.
    Сейчас как раз пилю проект похожий на героев.

  4. #4474

    По умолчанию

    Цитата Сообщение от MaxRiper Посмотреть сообщение
    Лол, настоятельно советую поиграть, скорее всего понравится, да и графика там далеко не майнкрафт, все красочно и детально.
    Сейчас как раз пилю проект похожий на героев.
    а требование игры какие? а то у меня видио карта на 128.

  5. #4475

    По умолчанию

    Цитата Сообщение от traveler Посмотреть сообщение
    а требование игры какие? а то у меня видио карта на 128.
    Как толсто. По крайней мере у меня на 4 ГБ ОЗУ (1 ГБ видеопамяти) работает отлично.
    Но с учетом того что игра в далеких 1990-ых вышла, она и на старом пентиуме/селероне будет работать.
    Видеокарта на 128 должна тянуть.

  6. #4476

    По умолчанию

    [QUOTE=MaxRiper;107518]Как толсто. По крайней мере у меня на 4 ГБ ОЗУ (1 ГБ видеопамяти) работает отлично.
    Но с учетом того что игра в далеких 1990-ых вышла, она и на старом пентиуме/селероне будет работать.
    Видеокарта на 128 должна тянуть.[/QUOTE у меня после 2007 года игры тупить начинают)

  7. #4477

    По умолчанию

    [QUOTE=traveler;107523]
    Цитата Сообщение от MaxRiper Посмотреть сообщение
    Как толсто. По крайней мере у меня на 4 ГБ ОЗУ (1 ГБ видеопамяти) работает отлично.
    Но с учетом того что игра в далеких 1990-ых вышла, она и на старом пентиуме/селероне будет работать.
    Видеокарта на 128 должна тянуть.[/QUOTE у меня после 2007 года игры тупить начинают)
    Купи видеокарту по лучше, если уж так играть хочется. Сейчас например, вполне играбельная GTX 750 ti дешевая.

  8. #4478

    По умолчанию

    Ладно, вот еще вопрос есть.. Я как бы в мейкере уже давно, но такого простого не знаю так как по дурной привычке всегда вкладывал РТП в архив.
    Сохранятся ли файлы типа музыки и графики при архивации, если я не буду влаживать РТП а все используемые ресурсы будут лежать в папке проекта?

  9. #4479
    Познающий Аватар для Morizel
    Информация о пользователе
    Регистрация
    25.11.2016
    Сообщений
    254
    Записей в дневнике
    59
    Репутация: 3 Добавить или отнять репутацию

    По умолчанию

    Я хочу сделать счётчик в левом нижнем углу, который увеличивается, когда приносишь предмет персонажу. Как руками его сделать?
    И как сделать в событиях возможность указать, сколько предметов можешь отдать персонажу?

  10. #4480
    Маститый Аватар для Alisa
    Информация о пользователе
    Регистрация
    29.08.2013
    Сообщений
    1,425
    Записей в дневнике
    8
    Репутация: 76 Добавить или отнять репутацию

    По умолчанию

    Я хочу сделать счётчик в левом нижнем углу, который увеличивается, когда приносишь предмет персонажу. Как руками его сделать?
    И как сделать в событиях возможность указать, сколько предметов можешь отдать персонажу?
    Какой мэйкер? я надеюсь VX ACE?
    Тогда вот есть такой скрипт, Show Variables называется:
    Спойлер скрипт:
    Код:
    =begin
    ================================================================================
     CDR - Show Variables 1.3
     -------------------------------------------------------------------------------
     Author: Ceodore
     Mail: ceodore@email.com
     https://ceodoremaker.wordpress.com
    
    ===============================Change log=======================================
      04/04/2013 - 1.3 release. Bug fixes and new stuff
      02/04/2013 - 1.2 release. Added font options.
      01/04/2013 - 1.1 release. Fixed a minor bug.
      01/04/2013 - 1.0 release.
      
    ===============================Description======================================
      This implementation is meant to provide a way display any number of variables 
      on the map.
    
    =================================License========================================
      You may freely use and modify this script as long as you do not change the
      original author information. If you use this on your game, include the author
      on the credits.
      
    ===================================Use==========================================
      Open a Script event command and follow the instructions:
      
      Before showing a variable you need to define it's options. To do it, type
      the command:
      
      sv_options(n,x,y,icon,color,dir,icon_pos, lzeros)
      Where n is the variable number and x and y are the value position on screen.
      The other are optional, but it's nice to define, you only need to do it once
      for each variable.
        
        icon -> The icon index
        color -> the color number
        dir -> the text direction, wich can be:
                    :ltr (left to right)
                    :rtl (Right)
                    :mid (center)
        icon_pos -> The icon position, can be :left or :right
        lzeros -> The number of leading zeroes
        
      show_variable(n)
      Shows a variable on screen as specified in sv_options()
      
      hide_variable(n)
      Hides the variable n if it's being displayed on screen.  
    
    ================================================================================
    =end
    module CDR_SV  
      # sub module containing default font options for the variable values
      module FONT
        NAME = ["VL Gothic"]
        SIZE = 30
        BOLD = false
        ITALIC = false
        SHADOW = false
      end
    end
    #==============================================================================
    #  DataManager
    #==============================================================================
    SuperDataManager = DataManager.dup
    module DataManager
        #--------------------------------------------------------------------------
        # * intercept: clears the variable settings list
        #--------------------------------------------------------------------------
        def self.create_game_objects
          Window_Variables.clear
          SuperDataManager.create_game_objects
        end
    end
    #==============================================================================
    #  Game_Interpreter
    #==============================================================================
    class Game_Interpreter
      #--------------------------------------------------------------------------
      # * new method: displays a variable on map screen
      #--------------------------------------------------------------------------
      def sv_options(n,x,y,icon=nil,color=1,dir=:ltr,icon_pos=:left, lzeros=0)
        return unless SceneManager.scene.is_a?(Scene_Map)
        sv_window = SceneManager.scene.variables_window
        case dir
          when :ltr
            text_direction = 0
          when :mid
            text_direction = 1
          when :rtl
            text_direction = 2
         end
        sv_window.sv_options(n,x,y,icon,color,text_direction,icon_pos,lzeros)
      end
      #--------------------------------------------------------------------------
      # * new method: displays a variable on map screen
      #--------------------------------------------------------------------------
      def show_variable(n)
        return unless SceneManager.scene.is_a?(Scene_Map)
        sv_window = SceneManager.scene.variables_window
        sv_window.show_variable(n)
      end  
      #--------------------------------------------------------------------------
      # * new method: hides a displayed variable
      #--------------------------------------------------------------------------
      def hide_variable(n)
        return unless SceneManager.scene.is_a?(Scene_Map)
        sv_window = SceneManager.scene.variables_window
        sv_window.hide_variable(n)
      end
    end
    #==============================================================================
    #  SvOptions
    #==============================================================================
    class SvOptions
      attr_accessor :id
      attr_accessor :x
      attr_accessor :y
      attr_accessor :text_color
      attr_accessor :x
      attr_accessor :text_direction
      attr_accessor :icon_index
      attr_accessor :icon_position
      attr_accessor :lzeros
      attr_accessor :visible
      
      #--------------------------------------------------------------------------
      # * new method: initialize
      #--------------------------------------------------------------------------
      def initialize(id,x,y,icon,color,dir,icon_pos,lzeros,visible)   
        @id = id    
        @x = x
        @y = y
        @text_color = color
        @text_direction = dir
        @icon_index = icon
        @icon_position = icon_pos
        @lzeros = lzeros
        @visible = visible    
      end
      #--------------------------------------------------------------------------
      # * new method: displays the variable on map screen
      #--------------------------------------------------------------------------
      def show
        @visible = true
      end
      #--------------------------------------------------------------------------
      # * new method: hides the variable from map screen
      #--------------------------------------------------------------------------
      def hide
        @visible = false
      end
    end
    #==============================================================================
    #  Window_Variables
    #==============================================================================
    class Window_Variables < Window_Base  
      @@items = {}
      #--------------------------------------------------------------------------
      # * new method: initialize
      #--------------------------------------------------------------------------
      def initialize
        super(0, 0, window_width, window_height)    
        self.opacity = 0
        self.visible = true
        refresh
      end
      #--------------------------------------------------------------------------
      # * new method: window_width
      #--------------------------------------------------------------------------
      def window_width
        return Graphics.width
      end
      #--------------------------------------------------------------------------
      # * new method: window_height
      #--------------------------------------------------------------------------
      def window_height
        return Graphics.height
      end
      #--------------------------------------------------------------------------
      # * new method: variable_width
      #--------------------------------------------------------------------------
      def variable_width
        return 160
      end
      #--------------------------------------------------------------------------
      # * new method: refresh
      #--------------------------------------------------------------------------
      def refresh
        contents.clear    
        @@items.each{|k,vw| draw_item(vw) if vw.visible}
      end
      #--------------------------------------------------------------------------
      # * new method: refresh
      #--------------------------------------------------------------------------
      def draw_item(item)
        icon_x = draw_item_icon(item) unless item.icon_index.nil?
        change_color(text_color(item.text_color))
        cdr_sv_font
        x_offset = item.icon_position == :left ? 28 : 0 
        text = $game_variables[item.id].to_s.rjust(item.lzeros, '0')    
        dir = item.text_direction
        draw_text(item.x+x_offset, item.y, variable_width, line_height, text, dir)
        reset_font_settings
        change_color(normal_color)
      end
      #--------------------------------------------------------------------------
      # * new method: draw_item_icon
      #--------------------------------------------------------------------------
      def draw_item_icon(item)
        case item.icon_position
          when :left
            icon_x = item.x
          when :right
            icon_x = item.x+variable_width
        end
        draw_icon(item.icon_index, icon_x, item.y)
        return icon_x
      end
      #--------------------------------------------------------------------------
      # * new method: sets the font options as specified on CDR_SV::FONT module
      #--------------------------------------------------------------------------
      def cdr_sv_font
        contents.font.name = CDR_SV::FONT::NAME
        contents.font.size = CDR_SV::FONT::SIZE
        contents.font.bold = CDR_SV::FONT::BOLD
        contents.font.italic = CDR_SV::FONT::ITALIC
        contents.font.shadow = CDR_SV::FONT::SHADOW
      end
      
      #--------------------------------------------------------------------------
      # * new method: resets the font settings as in default font
      #--------------------------------------------------------------------------
      def reset_font_settings
        contents.font.name = Font.default_name
        contents.font.size = Font.default_size
        contents.font.bold = Font.default_bold
        contents.font.italic = Font.default_italic
        contents.font.shadow = Font.default_shadow
      end
      
      #--------------------------------------------------------------------------
      # * new method: adds a new variable_window
      #--------------------------------------------------------------------------
      def sv_options(n,x,y,icon,color,dir,icon_pos, lzeros, visible = false)    
        if !@@items.has_key?(n)
          @@items[n] = SvOptions.new(n,x,y,icon,color,dir,icon_pos,lzeros,visible)
        else
          @@items[n].x = x      
          @@items[n].y = y
          @@items[n].icon_index = icon
          @@items[n].text_color = color
          @@items[n].text_direction = dir
          @@items[n].icon_position = icon_pos
          @@items[n].lzeros = lzeros
          @@items[n].visible = visible
        end
      end  
      
      #--------------------------------------------------------------------------
      # * new method: adds a new variable_window
      #--------------------------------------------------------------------------
      def show_variable(n)  
        return if !@@items.has_key?(n)
        @@items[n].show
      end  
    
      #--------------------------------------------------------------------------
      # * new method: removes a specific variable_window
      #--------------------------------------------------------------------------
      def hide_variable(n)
        return if !@@items.has_key?(n)
        @@items[n].hide
      end 
      
      #--------------------------------------------------------------------------
      # * new method: clears the variable options data
      #--------------------------------------------------------------------------
      def self.clear
        @@items = {}
      end 
    end
    #==============================================================================
    #  Scene_map
    #==============================================================================
    class Scene_Map < Scene_Base
      attr_accessor :variables_window
      alias cdr_sv_start start
      def start
        cdr_sv_start
        @variables_window = Window_Variables.new
      end
    
      #--------------------------------------------------------------------------
      # * alias: updates each variable_window
      #--------------------------------------------------------------------------
      alias cdr_sv_update update
      def update
        cdr_sv_update
        @variables_window.refresh
      end
    
    end


    Вот я создала демо по данному скрипту: https://yadi.sk/d/Hdj-qNryqZdmx
    Последний раз редактировалось Alisa; 17.01.2017 в 14:40.

Страница 448 из 643 ПерваяПервая ... 348398438446447448449450458498548 ... ПоследняяПоследняя

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

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

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

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

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

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

Ваши права

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