Skrypt Overlay mapping
Aktualny czas: 20-06-25, 22:12 Witaj! Przejdź do zakładki Logowanie lub Rejestracja


Wątek zamknięty 
[VXAce] Skrypt Overlay mapping
panciastekpl Offline
*


Liczba postów: 38
Dołączył: 16-04-14

Pomógł: 0



Post: #1
kartka Skrypt Overlay mapping

Szukam poradnika (polskiego XD) do skryptu Awesome Overlay Mapping.Bo jestem mało doświadczony w tym skrypcie placz.Proszę o szybką odpowiedz!?..
28-09-14 14:19
Znajdź wszystkie posty użytkownika
"Pomógł" przyznał(a):
Yoroiookami Offline
*


Liczba postów: 985
Dołączył: 01-05-13

Pomógł: 137



Post: #2
RE: Skrypt Overlay mapping

Może gdybyś zamieścił tu skrypt... :co:

[Obrazek: mt4dzY7.png]
[Obrazek: k5KQGOe.png]
28-09-14 20:35
Znajdź wszystkie posty użytkownika
"Pomógł" przyznał(a):
panciastekpl Offline
*


Liczba postów: 38
Dołączył: 16-04-14

Pomógł: 0



Post: #3
RE: Skrypt Overlay mapping

http://forums.rpgmakerweb.com/index.php?...y-mapping/ Prosze bardzo...
29-09-14 17:26
Znajdź wszystkie posty użytkownika
"Pomógł" przyznał(a):
Yoroiookami Offline
*


Liczba postów: 985
Dołączył: 01-05-13

Pomógł: 137



Post: #4
RE: Skrypt Overlay mapping

Nadal nie mogę ci pomóc. Zamiast skryptu wysłałeś mi link do ściągnięcia skryptu, którego zresztą nie mogę ściągnąć przez ograniczenia DropBoxa. :roll: Przykro mi.

[Obrazek: mt4dzY7.png]
[Obrazek: k5KQGOe.png]
29-09-14 17:38
Znajdź wszystkie posty użytkownika
"Pomógł" przyznał(a):
panciastekpl Offline
*


Liczba postów: 38
Dołączył: 16-04-14

Pomógł: 0



Post: #5
RE: Skrypt Overlay mapping

https://www.dropbox.com/s/8h0gxmi8jxe9uf...apping.txt Sorki ten powinien działać Tam jest cały skrypt a tu masz tak jagby opis http://www.rpgmakervxace.net/topic/19264...x-mapping/
29-09-14 17:50
Znajdź wszystkie posty użytkownika
"Pomógł" przyznał(a):
Yoroiookami Offline
*


Liczba postów: 985
Dołączył: 01-05-13

Pomógł: 137



Post: #6
RE: Skrypt Overlay mapping

Przetłumaczyłem ci skrypt, wydaje się w miarę zrozumiały. :ehe:
Mam nadzieję, że sobie poradzisz. :taktak:

################################################################################​
#                                                                              #
#                      ** Parallax Mapping by Riff **                          #
#                                                                              #
################################################################################​

################################################################################​
#                                                                              #
#                               -----------                                    #
#                             — Opis —                                  #
#                               -----------                                    #
#                                                                              #
#  Ten skrypt pozwala na używanie obrazków przy tworzeniu map.                 #
#  Jest 6 warstw podczas walki :                                               #
#                               -> warstwa podłoża                             #
#                               -> warstwa szczegółów                          #
#                               -> warstwa battlera (to w tym miejscu sprity   #
#                                  obu postaci i wrogów są                     #
#                                  pokazywane, nie możesz dodać niczego na     #
#                                  tej warstwie używając tego skryptu)         #
#                               -> "nadwarstwa"                                #
#                               -> warstwa nieba                               #
#                               -> warstwa światła/cieni/mgły/czego-tam-chcesz #
#                                                                              #
#  Możesz używać ilu warstw chcesz i ustawiać ich tempo.                       #
#  (albo zatrzymać animację). Możesz zmieniać warstwy używając przełączników.  #
#                                                                              #
################################################################################​

################################################################################​
#                                                                              #
#                                ------------                                  #
#                              — Warunki Użycia —                                #
#                                ------------                                  #
#                                                                              #
#   . Blahblahblah                                                             #
#   . Blahblahblah                                                             #
#   . Blahblahblah                                                             #
#   . Blahblahblah                                                             #
#   . Blahblahblah                                                             #
#   . Blahblahblah                                                             #
#   . Blahblahblah                                                             #
#   . Blahblahblah                                                             #
#   . Blahblahblah                                                             #
#   . Blahblahblah                                                             #
#   . Blahblahblah                                                             #
#   . Blahblahblah                                                             #
#                                                                              #
################################################################################​

################################################################################​
#                                                                              #
#                                  ---------                                   #
#                                — Changelog —                                 #
#                                  ---------                                   #
#                                                                              #
#    . 10/13/2013 — Data wydania skryptu                                           #
#                                                                              #
################################################################################​

################################################################################​
#                                                                              #
#                       -------------------------------                        #
#                     —    Problemy z kompatybilnością                          #
#                       -------------------------------                        #
#                                                                              #
#     Ten skrypt  :                                                            #
#                   + Modyfikuje sześć klas/modułów                            #
#                       / RPG::Map                                             #
#                       / Cache                                                #
#                       / Game_Map                                             #
#                       / Spriteset_Map                                        #
#                       / Game_Interpreter                                     #
#                       / Scene_Map                                            #
#                   + Dodaje jedną nową klasę                                  #
#                   + Nie nadpisuje metod                                      #
#                   + Używa pięciu metod                                       #
#                       / setup                       (Game_Map)               #
#                       / create_parallax             (Spriteset_Map)          #
#                       / dispose                     (Spriteset_Map)          #
#                       / update                      (Spriteset_Map)          #
#                       / post_transfer               (Scene_Map)              #
#                   + Używa zbyt wiele nowych metod       (39)                 #
#                                                                              #
################################################################################​

################################################################################​
#                                                                              #
#                            ------------                                      #
#                          —   Instrukcje     —                                  #
#                            ------------                                      #
#                                                                              #
#  — Parallax set                                                               #
#      To grupa warstw (ziemia, szczegóły, nadwarstwa, niebo & światło)        #
#      które używane są razem. Na przykład, mogę stworzyć set o nazwie         #
#      'Test' który będzie się składał z pięciu obrazków/warstw, które         #
#      domyślnie będą się wyświetlały razem.                                   #
#    Właściwie, parallax set to po prostu folder z pięcioma obrazkami. Jeżeli  #
#      parallax set zawiera mniej niż pięć obrazków, można go uznać za         #
#      'niekompletny' (nie oznacza to, że nie będzie działał, czytaj           #
#      dalej).                                                                 #
#    Najpierw musisz stworzyć nowy folder w folderze Graphics w swoim projekcie#
#      i nazwać go 'Map_Overlays', ten folder zawiera wszystkie twoje          #
#      parallax sety.                                                          #
#    Przy tworzeniu nowego parallax setu, po prostu załóż nowy folder          #
#      i nazwij go tak samo, jak swój parallax set. Następnie umieść w folderze#
#      warstwy których planujesz użyć. Nazwij te obrazki na podstawie          #
#      warstwy którą reprezentują, a więc :                                    #
#              -> ziemia                                                       #
#              -> szczegóły                                                    #
#              -> nadwarstwa                                                   #
#              -> niebo                                                        #
#              -> światło                                                      #
#    Aby ustawić domyslny parallax dla mapy, nazwij parallax set w ten sposób: #
#              -> MapX                                                         #
#      X oznacza ID mapy.                                                                   #
#                                                                                                 #
#    /!\ Nie wypisuj wszystkich zer przy podawaniu ID mapy.                    #
#        To znaczy, napisz 'Map1' zamiast 'Map001'.                                #
#                                                                                                 #
#    Jeżeli nie podasz wszystkich obrazków w swoim parallax set, tylko         #
#      zamieszczone obrazki będą wyświetlane.                                  #
#                                                                              #
#  — Animacja    —                                                               #
#    Możesz animować mapy z parallaxem, lub ich części (wybrane warstwy)       #
#      używając tego skryptu. Aby to zrobić, wystarczy dodać X po nazwie       #
#      warstwy, X oznacza ilość klatek animacji. Na przykład, możesz użyć      #
#      sky1, sky2, .... Nie ma limitu klatek, których możesz użyć.             #
#    Jeżeli chcesz animować warstwę, musisz zacząć od 1, jeśli nie ma w niej   #
#      pierwszej klatki, wtedy skrypt po prostu pominie tą warstwę i           #
#      w ogóle jej nie wyświetli.                                              #
#    Możesz animować wyłącznie jedną warstwę, jeśli chcesz. (Dowolną ilość)    #
#    Animacja odegra się w ten sposób : 1-2-3-...-(n-1)-n-(n-1)-...-3-2-1      #
#      W ten sam sposób, w jaki postaci(sprity) są animowane w programie.      #
#    Domyślne tempo odgrywania animacji ustawione jest w pierwszym module.     #
#                                                                              #
#  — Notatki—                                                                    #
#    Jeśli chcesz użyć parallaxu dla tła walki, umieść notkę na mapie używając #
#      tego:                                                                   #
#                   <switch parallax: switch_id parallax_set>                  #
#                                                                              #
#      Gdzie parallax_set to nazwa folderu którego chcesz użyć, a              #
#      switch_id to przełącznik który musi być włączony żeby użyć parallax setu#
#    Jeżeli umieścisz notatki w wielu przełącznikach parallax setu i kilka z   #
#      z tych przełączników są włączone, tylko pierwsza próba zostanie         #
#      wzięta pod uwagę.                                                       #
#                                                                              #
#  — Wywołanie Skryptu                                                          #
#   Możesz użyć script call("wywołaj skrypt") tylko w zdarzeniach na mapie.    #
#                                                                              #
#                -> map_reset_timer(timer, layer) ustawi tempo animacji        #
#                   wybranej warstwy. Jeżeli żadna warstwa nie jest wybrana    #
#                   będzie dotyczyło to wszystkich warstw.                     #
#                   Możesz zatrzymać animację ustawiając ujemny timer.         #
#                   Możesz odtworzyć zatrzymaną animację używając script call. #
#                   Jeżeli script call będzie użyte poza mapą, lub na          #
#                   mapie bez parallaxu, nic się nie stanie.                   #
#                                                                              #
################################################################################​

($imported ||= {})['RIFF_MAP_PARALLAX'] = true

#===============================================================================​
# ** RIFF::MAP_PARALLAX
#-------------------------------------------------------------------------------
# Moduł który zapisuje Regexp i zmienne do ustawienia.
#===============================================================================​
module RIFF
  module MAP_PARALLAX
    DEFAULT_ANIMATION_PACE = 60
    
################################################################################​
################################################################################​
###                NIE EDYTUJCIE NIC POZA TĄ LINIJKĄ                         ###
################################################################################​
################################################################################​
    REGEXP = /<\s*switch[-_ ]parallax\s*:\s*(\d+)\s+(\w+)\s*>/
  end
end

#===============================================================================​
# ** RPG::Map
#-------------------------------------------------------------------------------
# Modified to process the note-tagging.
#===============================================================================​
module RPG
  class Map
    def load_parallax_notetags
      matchings = self.note.scan(RIFF::MAP_PARALLAX::REGEXP)
      matchings.each { |block|
       (@parallaxes ||= {})[block[0]] = block[1]}
      return @parallaxes
    end
  end
end

#===============================================================================​
# ** Game_Map
#-------------------------------------------------------------------------------
# Setup modified to include all the overlays folders (and save workload farther
#  in the script).
#===============================================================================​
class Game_Map
  attr_reader :parallax
  alias :riff_map_parallax_setup  :setup
  
  def setup(map_id)
    riff_map_parallax_setup(map_id)
    @parallax = @map.load_parallax_notetags
    (@parallax ||= {})['Default'] = "Map#{map_id}"
  end
end

#===============================================================================​
# ** Cache
#-------------------------------------------------------------------------------
# Modified to add a new bitmap category that can be loaded.
#===============================================================================​
module Cache
  def self.map_parallax(map_parallax)
    begin
      return Cache.normal_bitmap('Graphics/Map_Overlays/' + map_parallax)
    rescue
      return nil
    end
  end
end

#===============================================================================​
# ** Sprite_Map
#-------------------------------------------------------------------------------
# New class that will handle all the sprite in the Spriteset_Map class.
#===============================================================================​
class Sprite_Map < Sprite
  attr_accessor :folder
  attr_accessor :layer
  attr_accessor :count
  attr_accessor :index
  attr_accessor :reset_timer
  
  #-----------------------------------------------------------------------------
  # Initialize method that stores various properties of the sprite.
  #-----------------------------------------------------------------------------
  def initialize(viewport, folder_name, layer, count)
    super(viewport)
    @folder      = folder_name
    @layer       = layer
    @count       = count
    @index       = 1
    @reset_timer = RIFF::MAP_PARALLAX::DEFAULT_ANIMATION_PACE
    @timer       = @reset_timer
    update
  end
  
  #-----------------------------------------------------------------------------
  # Update method that checks if part of the graphics infos are changed or if
  #  the sprite is animated.
  #-----------------------------------------------------------------------------
  def update
    update_animation             if (@count != nil && @timer == 0)
    update_bitmap                if graphic_changed?
    @timer = [0, @timer - 1].max if (@count != nil && @reset_timer > 0)
    update_position
  end
  
  #-----------------------------------------------------------------------------
  # Change the infos control points and call for the bitmap creation method.
  #-----------------------------------------------------------------------------
  def update_bitmap
    @current_folder = @folder
    @current_layer  = @layer
    self.bitmap     = create_bitmap if !self.disposed?
  end
  
  #-----------------------------------------------------------------------------
  # Method that check if graphics are changed using control points @current_layer
  #  and @current_folder.
  #-----------------------------------------------------------------------------
  def graphic_changed?
    return @current_folder.nil? || @current_folder != @folder || @current_layer != @layer
  end
  
  #-----------------------------------------------------------------------------
  # Method that create the sprite's bitmap according to current graphic infos.
  #-----------------------------------------------------------------------------
  def create_bitmap
    if @folder.nil? || @layer.nil?
      return Cache.empty_bitmap
    else
      return Cache.map_parallax(@folder + @layer)
    end
  end
  
  #-----------------------------------------------------------------------------
  # Method that animate the sprite by checking if the way the sprite is
  #  animated and the existence of next (or previous) frame (and change the
  #  animation accordingly).
  #-----------------------------------------------------------------------------
  def update_animation
    @timer = @reset_timer
    if @count == :up
      if next_exist?
        @layer  = next_frame
        @index  += 1
      else
        @layer  = previous_frame
        @count  = :down
        @index -= 1
      end
    elsif @count == :down
      if previous_exist?
        @layer  = previous_frame
        @index -= 1
      else
        @layer  = next_frame
        @index += 1
        @count  = :up
      end
    end
  end
  
  #-----------------------------------------------------------------------------
  # Determine if next frame exists (basically if image @layer(n+1) exists).
  #-----------------------------------------------------------------------------
  def next_exist?
    bitmap_test = Cache.map_parallax(@folder + next_frame)
    !bitmap_test.nil?
  end
  
  #-----------------------------------------------------------------------------
  # Determine if previous frame exists (basically if image @layer(n-1) exists).
  #-----------------------------------------------------------------------------
  def previous_exist?
    bitmap_test = Cache.map_parallax(@folder + previous_frame)
    !bitmap_test.nil?
  end
  
  #-----------------------------------------------------------------------------
  # Returns @layer(n+1).
  #-----------------------------------------------------------------------------
  def next_frame
    @layer.gsub(/\d+/) { |digit| digit = (@index + 1).to_s}
  end
  
  #-----------------------------------------------------------------------------
  # Returns @layer(n-1).
  #-----------------------------------------------------------------------------
  def previous_frame
    @layer.gsub(/\d+/) { |digit| digit = (@index - 1).to_s}
  end
  
  #-----------------------------------------------------------------------------
  # Method that change @folder_name and sometimes @layer variable.
  #  That method also proceed with the swapping between animated and static
  #  parallax.
  #-----------------------------------------------------------------------------
  def change_graphic(folder)
    layer            = @layer.gsub(/\d+/) {|digit| digit = ""}
    path             = folder + layer
    test_layer       = Cache.map_parallax(path)
    if test_layer
      @layer         = layer
      @folder_name   = folder
      @count         = nil
    else
      path          += '1'
      test_layer     = Cache.map_parallax(path)
      if test_layer
        @layer       = "#{layer}1"
        @index       = 1
        @folder_name = folder
        @count       = :up
      else
        return
      end
    end
  end
  
  #-----------------------------------------------------------------------------
  # Method that fixes the parallax.
  #-----------------------------------------------------------------------------
  def update_position
    if !self.disposed?
      self.ox = $game_map.display_x * 32 if self.ox != $game_map.display_x * 32
      self.oy = $game_map.display_y * 32 if self.oy != $game_map.display_y * 32
    end
  end
end

#===============================================================================​
# ** Spriteset_Map
#-------------------------------------------------------------------------------
# Modified the core functioning so that the game can display all overlays.
#===============================================================================​
class Spriteset_Map
  alias :riff_map_parallax_create_parallax  :create_parallax
  alias :riff_map_parallax_dispose          :dispose
  alias :riff_map_parallax_update           :update
  
  #-----------------------------------------------------------------------------
  # Modified to add all layers.
  #-----------------------------------------------------------------------------
  def create_parallax
    update_parallaxes
    create_overlays
    riff_map_parallax_create_parallax
  end
  
  #-----------------------------------------------------------------------------
  # Method that sets the available parallaxes.
  #-----------------------------------------------------------------------------
  def update_parallaxes
    @parallaxes = $game_map.parallax
  end
  
  #-----------------------------------------------------------------------------
  # Method that creates all layers.
  #-----------------------------------------------------------------------------
  def create_overlays
    if any_parallax_folder_exists?
      @parallaxed    = true
      @parallax_name = get_parallax_name
      create_ground_sprite
      create_details_sprite
      create_overlay_sprite
      create_sky_sprite
      create_light_sprite
    end
  end
  
  #-----------------------------------------------------------------------------
  # Method that checks if the default folder exists or, if the map is
  # note-tagged, if other folders exists.
  #-----------------------------------------------------------------------------
  def any_parallax_folder_exists?
    @parallaxes.each{|switch, folder|
      return true if !folder_exists?(folder).nil?}
    return false
  end
  
  #-----------------------------------------------------------------------------
  # Method that checks wether the set layer exists or not.
  #-----------------------------------------------------------------------------
  def folder_exists?(folder, layer_prefix = '/ground')
    path = "#{folder}#{layer_prefix}"
    bitmap_test = Cache.map_parallax(path)
    if bitmap_test.nil?
      bitmap_test = Cache.map_parallax("#{path}1")
      if bitmap_test
        layer = "/#{layer_prefix}1"
        count = :up
      end
    else
      layer = layer_prefix
      count = nil
    end
    return [layer, count] if bitmap_test
    return nil
  end
  
  #-----------------------------------------------------------------------------
  # Method that decides which available parallax to use.
  #-----------------------------------------------------------------------------
  def get_parallax_name
    @parallaxes.each{ |switch, parallax|
     next if switch == 'Default'
     return parallax if $game_switches[switch.to_i]}
    return @parallaxes['Default']
  end
  
  #-----------------------------------------------------------------------------
  # Method that creates the ground sprite.
  #-----------------------------------------------------------------------------
  def create_ground_sprite
    layer_infos        = folder_exists?(@parallax_name)
    if layer_infos.nil?
      @ground_sprite   = Sprite_Map.new(@viewport, nil, nil, nil)
    else  
      @ground_sprite   = Sprite_Map.new(@viewport1, @parallax_name, layer_infos[0], layer_infos[1])
      @ground_sprite.z = 0
    end
  end
  
  #-----------------------------------------------------------------------------
  # Method that creates the details sprite.
  #-----------------------------------------------------------------------------
  def create_details_sprite
    layer_infos         = folder_exists?(@parallax_name, '/details')
    if layer_infos.nil?
      @details_sprite   = Sprite_Map.new(@viewport, nil, nil, nil)
    else
      @details_sprite   = Sprite_Map.new(@viewport1, @parallax_name, layer_infos[0], layer_infos[1])
      @details_sprite.z = 1050
    end
  end
  
  #-----------------------------------------------------------------------------
  # Method that creates the overlay sprite.
  #-----------------------------------------------------------------------------
  def create_overlay_sprite
    layer_infos         = folder_exists?(@parallax_name, '/overlay')
    if layer_infos.nil?
      @overlay_sprite   = Sprite_Map.new(@viewport, nil, nil, nil)
    else
      @overlay_sprite   = Sprite_Map.new(@viewport1, @parallax_name, layer_infos[0], layer_infos[1])
      @overlay_sprite.z = 1000
    end
  end
  
  #-----------------------------------------------------------------------------
  # Method that creates the sky sprite.
  #-----------------------------------------------------------------------------
  def create_sky_sprite
    layer_infos     = folder_exists?(@parallax_name, '/sky')
    if layer_infos.nil?
      @sky_sprite   = Sprite_Map.new(@viewport, nil, nil, nil)
    else
      @sky_sprite   = Sprite_Map.new(@viewport1, @parallax_name, layer_infos[0], layer_infos[1])
      @sky_sprite.z = 1000
    end
  end
  
  #-----------------------------------------------------------------------------
  # Method that creates the light sprite.
  #-----------------------------------------------------------------------------
  def create_light_sprite
    layer_infos             = folder_exists?(@parallax_name, '/light')
    if layer_infos.nil?
      @light_sprite         = Sprite_Map.new(@viewport, nil, nil, nil)
    else
      @light_sprite         = Sprite_Map.new(@viewport1, @parallax_name, layer_infos[0], layer_infos[1])
      @light_sprite.z       = 1100
      @light_sprite.opacity = 64
    end
  end
  
  #-----------------------------------------------------------------------------
  # Modified to dispose of the additional layers.
  #-----------------------------------------------------------------------------
  def dispose
    dispose_overlays if @parallaxed
    riff_map_parallax_dispose
  end
  
  #-----------------------------------------------------------------------------
  # Method that disposes of the parallax layers.
  #-----------------------------------------------------------------------------
  def dispose_overlays
    dispose_ground_sprite  if @ground_sprite
    dispose_details_sprite if @details_sprite
    dispose_overlay_sprite if @overlay_sprite
    dispose_sky_sprite     if @sky_sprite
    dispose_light_sprite   if @light_sprite
  end
  
  #-----------------------------------------------------------------------------
  # Method that disposes of the ground sprite.
  #-----------------------------------------------------------------------------
  def dispose_ground_sprite
    @ground_sprite.bitmap.dispose
    @ground_sprite.dispose
  end
  
  #-----------------------------------------------------------------------------
  # Method that disposes of the details sprite.
  #-----------------------------------------------------------------------------
  def dispose_details_sprite
    @details_sprite.bitmap.dispose
    @details_sprite.dispose
  end
  
  #-----------------------------------------------------------------------------
  # Method that disposes of the overlay sprite.
  #-----------------------------------------------------------------------------
  def dispose_overlay_sprite
    @overlay_sprite.bitmap.dispose
    @overlay_sprite.dispose
  end
  
  #-----------------------------------------------------------------------------
  # Method that disposes of the sky sprite.
  #-----------------------------------------------------------------------------
  def dispose_sky_sprite
    @sky_sprite.bitmap.dispose
    @sky_sprite.dispose
  end
  
  #-----------------------------------------------------------------------------
  # Method that disposes of the light sprite.
  #-----------------------------------------------------------------------------
  def dispose_light_sprite
    @light_sprite.bitmap.dispose
    @light_sprite.dispose
  end
  
  #-----------------------------------------------------------------------------
  # Modified to update all layers.
  #-----------------------------------------------------------------------------
  def update
    riff_map_parallax_update
    update_all_layers
  end
  
  #-----------------------------------------------------------------------------
  # Method that updates each layers.
  #-----------------------------------------------------------------------------
  def update_all_layers
    [@ground_sprite, @details_sprite, @overlay_sprite, @sky_sprite, @light_sprite].each{ |sprite|
        sprite.update if sprite
    }
  end
  
  #-----------------------------------------------------------------------------
  # Method called by Game_Interpreter, modifiy the reset_timer attribute of
  # corresponding layer(s).
  #-----------------------------------------------------------------------------
  def reset_timer(timer, layer)
    if layer.nil?
      [@ground_sprite, @details_sprite, @overlay_sprite, @sky_sprite, @light_sprite].each{ |sprite|
        sprite.reset_timer = timer}
    else
      case layer
      when 'ground'
        sprite = @ground_sprite
      when 'details'
        sprite = @details_sprite
      when 'overlay'
        sprite = @overlay_sprite
      when 'sky'
        sprite = @sky_sprite
      when 'light'
        sprite = @light_sprite
      end
      sprite.reset_timer = timer
    end
  end
end

#===============================================================================​
# ** Scene_Map
#-------------------------------------------------------------------------------
# Methods called in Game_Interpreter (because you can't grab the spriteset
#  anywhere else than here).
# Also modified so that when transfering to another map graphics are changed.
#===============================================================================​
class Scene_Map
  alias :riff_map_parallax_post_transfer  :post_transfer
  
  #-----------------------------------------------------------------------------
  # Modified to change the graphics when leaving a map.
  #-----------------------------------------------------------------------------
  def post_transfer
    @spriteset.dispose_overlays
    @spriteset.update_parallaxes
    @spriteset.create_overlays
    riff_map_parallax_post_transfer
  end
  
  #-----------------------------------------------------------------------------
  # Method called by Game_Interpreter to grab the spriteset.
  #-----------------------------------------------------------------------------
  def reset_timer(timer, layer)
    @spriteset.reset_timer(timer, layer)
  end
end

#===============================================================================​
# ** Game_Interpreter
#-------------------------------------------------------------------------------
# Adding the various methods needed for script calls.
#===============================================================================​
class Game_Interpreter
  #-----------------------------------------------------------------------------
  # Method corresponding to the script call.
  #-----------------------------------------------------------------------------
  def map_reset_timer(timer, layer = nil)
    SceneManager.scene.reset_timer(timer, layer) if SceneManager.scene_is?(Scene_Map)
  end
end

Nie wiem, czy autor miał na myśli "in battle" jako podczas walki, czy jako...działających. :co:

[Obrazek: mt4dzY7.png]
[Obrazek: k5KQGOe.png]
(Ten post był ostatnio modyfikowany: 29-09-14 18:45 przez Yoroiookami.)
29-09-14 18:44
Znajdź wszystkie posty użytkownika
"Pomógł" przyznał(a):
panciastekpl Offline
*


Liczba postów: 38
Dołączył: 16-04-14

Pomógł: 0



Post: #7
RE: Skrypt Overlay mapping

Dzięki zajmę się tym jutro narazię robię mapki i szukam tilesetów wojennych...

No poradzę sobie tylko trochę trudno będzie do perfekcji opanować mapowanie... Ale sprubuje..
(Ten post był ostatnio modyfikowany: 29-09-14 19:05 przez panciastekpl.)
29-09-14 18:55
Znajdź wszystkie posty użytkownika
"Pomógł" przyznał(a):
Wątek zamknięty 


Skocz do:


Użytkownicy przeglądający ten wątek: 1 gości

Kontakt | Ultima Forum | Wróć do góry | Wróć do forów | Wersja bez grafiki | RSS
Powered By MyBB. © 2013 MyBB Group. All Rights Reserved.
Skórka by Ayene.