RPG maker VX


Unirse al foro, es rápido y fácil

RPG maker VX
RPG maker VX
¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.
Últimos temas
» Script de menu
por maxi Jue 04 Dic 2014, 1:44 pm

» Ayuda intro animado!!!
por maxi Miér 03 Dic 2014, 9:41 pm

» ayuda con este engin
por maxi Miér 03 Dic 2014, 8:42 am

» Hud de Vida 100% Personalizable - Engine Sencillo! Sin Scripts :)
por davidaikago Jue 20 Nov 2014, 10:58 am

» Ultimate parallax control by:GDS [ace]
por arellano Miér 08 Oct 2014, 8:28 pm

» Script Touhou (animated) Map name (v1.4)
por davidaikago Miér 08 Oct 2014, 2:09 pm

» tutorial puerta nueva
por davidaikago Miér 08 Oct 2014, 9:08 am

» cámara de fotos
por davidaikago Miér 08 Oct 2014, 9:05 am

» Imperial Action System II Demo
por davidaikago Miér 08 Oct 2014, 8:47 am

» VE Batalla animada [ACE]
por FhierusIV Jue 18 Sep 2014, 10:57 am

» Nuevo Reglamento del Foro [Vigente desde Septiembre 2014]
por maxi Miér 17 Sep 2014, 8:37 am

» MOG|Animated Title
por Souta21 Mar 09 Sep 2014, 7:24 pm

» Tutorial Engine - Cambiar Character al Equipar Objeto
por maxi Lun 21 Jul 2014, 10:19 am

» Script de climas
por gambasoxd Sáb 19 Jul 2014, 8:58 am

» Script de contraseña(codigo) para abrir un cofre
por rpgame Jue 03 Jul 2014, 6:03 pm

¿Quién está en línea?
En total hay 1 usuario en línea: 0 Registrados, 0 Ocultos y 1 Invitado

Ninguno

[ Ver toda la lista ]


El record de usuarios en línea fue de 117 durante el Mar 09 Ago 2011, 3:39 pm

Ultimate parallax control by:GDS [ace]

4 participantes

Ir abajo

Ultimate parallax control by:GDS [ace] Empty Ultimate parallax control by:GDS [ace]

Mensaje por pigu_6 Vie 31 Ago 2012, 6:51 pm

Bueno como dice el post, dejo el script del Ultimate parallax control, esta creado por GDS
Tiene licencia libre asi que no hay problema con postearlo mientras diga quien es el creador.

Traduje el script y cambie un poco las explicaciones para hacerlo funcionar porque a mi no me resultaron comodas como estaba, me costo poner los parallax.


Dejo aca tambien las explicaciones para los q les molesta leer desde el script.

ACLARACION:

Es muy basica para los que recien arracan con esto,
Suelo desactivado Suelo activo mapa 1 Suelo activo mapa 1 y 20
Ground = [0,
Ground = [1,
Ground = [1, 20

EL CIELO
Spoiler:

LAS LUCES
Spoiler:


LAS SOMBRAS

Spoiler:

EL SUELO

Spoiler:


EL SCRIPT COMPLETO LISTO PARA USARSE

Código:
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Ultimate Parallax Control V1.0
#
# By: GDS
# Translate: Pigu
#
#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2012.21.05 - Script istart and finish
#
#==============================================================================
# ▼ Introduccion
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Con este script tienes todas las funciones de parallaxes en uno
#  no necesita "script calls", <notetags> ni tampoco switches o variables
#  aunque estos ultimos si se pueden activar
#
#==============================================================================
#  CONFIGURACIONES
#==============================================================================
module GDS_Parallax
module Parallax
  #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  #All parallaxes are fixed by defaut now,
  #if want the default movement of the parallaxex just put the map id here
  #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  FIXED_Parallax =[  #<=|Id of the map that will not be fixed
] #
  #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  # Cielo,
  #  Esta capa esta arriba de todas las demas, no tiene movimiento
  #
  # Para activarla necesitamos una imagen en \Graphics\Parallaxes
  # con el nombre "x"_layer2,
  # X es el numero de ID que lleva el mapa
  #
  # Ejemplo:
  #        "\Graphics\Parallaxes\1_layer2"
  #  Esto activa la imagen "layer2"
  #
  # Parallax2  <= Poner el ID del mapa q va a usar cielo
  #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  Parallax2 = [0, # Mapas con el Cielo activado
]
  #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  # Luces
  #  Esta capa esta justo debajo de la capa cielo, puede moverse o estar quieta
  #
  #
  # Para activarla necesitamos una imagen en \Graphics\Parallaxes
  # con el nombre "X"_light 
  # X es el numero de ID que lleva el mapa
  #
  # Ejemplo:
  #        "\Graphics\Parallaxes\1_light"
  #
  #
  # Light <= Poner el ID del mapa q va a usar luces
  #
  #
  #:Flicker_Light
  #
  # 0            => No se mueve
  # 1 o mas => la luz se mueve, cualquier valor mayor a 1 queda raro el efecto
  #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  Light = [0,            #< Mapas con luces activadas
]
  Flicker_Light = 1                      #< Movimiento de luces

  #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  # Sombras
  #  Esta capa esta debajo del Cielo y las Luces, esta arriba del Suelo
  #  puede moverse o estar quieta
  #
  # Para activarla necesitamos una imagen en  \Graphics\Parallaxes
  # con el nombre "X"_shadow 
  # X es el numero de ID que lleva el mapa
  #
  # Ejemplo:
  #        "\Graphics\Parallaxes\1_shadow"
  #
  #
  # Shadow <= Poner el ID del mapa que va a usar las sombras
  #
  #
  #:Flicker_Shadow
  #
  # 0            => No se mueve
  # 1 o mas => la sombra se mueve, cualquier valor mayor a 1 queda raro el efecto
  #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  Shadow = [0,                    #<=|Mapas con sombras activadas
]
  Flicker_Shadow = 0        #<= Movimiento de sombras

  #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  # Suelo
  # Esta capa esta debajo de los personajes y eventos y por encima de los Tiles
  #
  # Para activarla necesitamos una imagen en \Graphics\Parallaxes\
  # Con el nombre "X"_Ground 
  # X es el numero de ID que lleva el mapa
  #
  # Ejemplo:
  #        "\Graphics\Parallaxes\1_ground"
  #
  #
  # Ground <= Poner el ID del mapa que va a usar las sombras
  #
  #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  Ground = [1, 3  #<=|Id of the map that will use the ground layer

 
]
  #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  # Switches/Interruptores y Variables
  #
  # Interruptores
  #
  #  Activa o desactiva las capas de parallax
  #  si no lo vas a usar deja "nil"
  #
  # Variables
  # cambia la imagen de que va a usar
  #
  # Ejemplo:
  #        La luz del mapa cuatro se llama: "4_light"
  #
  #  pero si queres usar variables para ver que luz se activa:
  #
  # Valor de variable = "0 nombre"  = "4_light"
  # Valor de variable = "1 nombre"  = "4-1_light"
  # Valor de variable = "5 nombre"  = "4-5_light
  #
  # Hay que agregar "-X" despues del ID del mapa
  # en el que "X" es el numero de variable
  #
  #
  #
  #        Atencion
  #
  # Los switches/interruptores solo van a funcionar cuando este en on/off
  # Las variables necesitan cambiar de mapa primero
  #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  SWITCH_SKY = nil       
  SWITCH_LIGHT = nil   
  SWITCH_SHADOW = nil   
  SWITCH_GROUND = nil
 
  VARIABLE_SKY = nil     
  VARIABLE_LIGHT = nil 
  VARIABLE_SHADOW = nil   
  VARIABLE_GROUND = nil   
#==============================================================================
# End of configuration
#==============================================================================
#==============================================================================
# ** Spriteset_Map
#------------------------------------------------------------------------------
#  This class brings together map screen sprites, tilemaps, etc. It's used
# within the Scene_Map class.
#==============================================================================
end
end
class Spriteset_Map
  include GDS_Parallax::Parallax
  #=============================================================================
  # * alias method create_parallax
  #=============================================================================
  alias create_parallax_gds create_parallax
  def create_parallax
    create_parallax_gds
    create_parallaxes
    @do_it1 = true;@do_it2 = true;@do_it3 = true;@do_it4 = true
  end
  def create_parallaxes
    map = $game_map.map_id
    @maps = $game_map.map_id
    ;@check1 = true;@check2 = true;@check3 = true;@check4 = true
    @fixed_p = false;@create1 = false;@create2 = false;@create2 = false;@create3 = false;@create4 = false
    for i in FIXED_Parallax;@fixed_p = true if i == map;end
    for i in Parallax2;@create1 = true if i == map;end
    for i in Light;@create2 = true if i == map;end
    for i in Shadow;@create3 = true if i == map;end
    for i in Ground;@create4 = true if i == map;end
    @parallax1 = Plane.new(@viewport1) if @create1 == true
    @parallax1.z = 203 if @create1 == true;@check1 = false
    @parallax2 = Plane.new(@viewport1) if @create2 == true
    @parallax2.z = 202 if @create2 == true ;@check2 = false
    @parallax3 = Plane.new(@viewport1) if @create3 == true
    @parallax3.z = 201 if @create3 == true;@check3 = false
    @parallax4 = Plane.new(@viewport1) if @create4 == true
    @parallax4.z = 50 if @create4 == true ;@check4 = false
    on1= false
    on2= false
    on3= false
    on4= false
  end
  #=============================================================================
  # * new method create_and_dispose
  # * new method check_for_dispose
  #=============================================================================
  def create_and_dispose
    @parallax1.dispose if @on1 == true
    @parallax2.dispose if @on2 == true
    @parallax3.dispose if @on3 == true
    @parallax4.dispose if @on4 == true
    create_parallaxes
    p "done"
  end
  def check_for_dispose
  create_and_dispose if @maps != $game_map.map_id
 end
  #=============================================================================
  # * new method check_for_swicthes
  #=============================================================================
 
 
 
 
 
  #=============================================================================
  # * alias method dispose_parallax 
  #=============================================================================
  alias dispose_parallax_gds dispose_parallax
  def dispose_parallax
    @parallax1.dispose if @on1 == true
    @parallax2.dispose if @on2 == true
    @parallax3.dispose if @on3 == true
    @parallax4.dispose if @on4 == true
    dispose_parallax_gds
  end
  #=============================================================================
  # * overwrite method update_parallax
  #=============================================================================
  def update_parallax
    check_for_dispose
    @parallax1.visible= $game_switches[SWITCH_SKY] if SWITCH_SKY != nil
    @parallax2.visible= $game_switches[SWITCH_LIGHT] if SWITCH_LIGHT != nil
    @parallax3.visible= $game_switches[SWITCH_SHADOW] if SWITCH_SHADOW != nil
  @parallax4.visible= $game_switches[SWITCH_GROUND] if SWITCH_GROUND != nil
   
    if @parallax_name != $game_map.parallax_name
          @parallax_name = $game_map.parallax_name
          @parallax.bitmap.dispose if @parallax.bitmap
          @parallax.bitmap = Cache.parallax(@parallax_name)
          Graphics.frame_reset
    end
    if @create1 == true and @check1 == false
          @parallax1.bitmap.dispose if @parallax1.bitmap
          sky = $game_map.map_id.to_s
          if VARIABLE_SKY != nil
            sky = $game_map.map_id.to_s+"-"+$game_variables[VARIABLE_SKY].to_s
            sky = $game_map.map_id.to_s if $game_variables[VARIABLE_SKY] == 0
          end
          @parallax1.bitmap = Cache.parallax(sky+"_layer2")
          Graphics.frame_reset
          @check1 = true;@on1 = true
    end
    if @create2 == true and @check2 == false
          @parallax2.bitmap.dispose if @parallax2.bitmap
          light = $game_map.map_id.to_s
          if VARIABLE_LIGHT != nil
            light = $game_map.map_id.to_s+"-"+$game_variables[VARIABLE_LIGHT].to_s
            light = $game_map.map_id.to_s if $game_variables[VARIABLE_LIGHT] == 0
          end
          @parallax2.bitmap = Cache.parallax(light+"_light")
          Graphics.frame_reset
          @check2 = true;@on2 = true
    end
    if @create3 == true and @check3 == false
          @parallax3.bitmap.dispose if @parallax3.bitmap
          shadow = $game_map.map_id.to_s
          if VARIABLE_SHADOW != nil
            shadow = $game_map.map_id.to_s+"-"+$game_variables[VARIABLE_SHADOW].to_s
            shadow = $game_map.map_id.to_s if $game_variables[VARIABLE_SHADOW] == 0
          end
          @parallax3.bitmap = Cache.parallax(shadow+"_shadow")
          Graphics.frame_reset
          @check3 = true;@on3 = true
    end
        if @create4 == true and @check4 == false
          @parallax4.bitmap.dispose if @parallax4.bitmap
          ground = $game_map.map_id.to_s
          if VARIABLE_GROUND != nil
            ground = $game_map.map_id.to_s+"-"+$game_variables[VARIABLE_GROUND].to_s
            ground = $game_map.map_id.to_s if $game_variables[VARIABLE_GROUND] == 0
          end
          @parallax4.bitmap = Cache.parallax(ground+"_ground")
          Graphics.frame_reset
          @check4 = true;@on4 = true
    end
          @parallax1.ox = $game_map.display_x * 32  if @create1 == true
          @parallax1.oy = $game_map.display_y * 32  if @create1 == true
 
          @parallax2.ox = $game_map.display_x * 32 + rand(Flicker_Light) if @create2 == true
          @parallax2.oy = $game_map.display_y * 32 + rand(Flicker_Light) if @create2 == true
         
          @parallax3.ox = $game_map.display_x * 32 + rand(Flicker_Shadow) if @create3 == true
          @parallax3.oy = $game_map.display_y * 32 + rand(Flicker_Shadow) if @create3 == true
         
          @parallax4.ox = $game_map.display_x * 32  if @create4 == true
          @parallax4.oy = $game_map.display_y * 32  if @create4 == true
         
          if @fixed_p == true
          @parallax.ox = $game_map.parallax_ox(@parallax.bitmap)
          @parallax.oy = $game_map.parallax_oy(@parallax.bitmap)
    else
          @parallax.ox = $game_map.display_x * 32
          @parallax.oy = $game_map.display_y * 32
    end
  end
end
pigu_6
pigu_6
300
300

Masculino

Edad 32

Cantidad de envíos 397

Maker Cash 714

Reputación 95


Extras
Sobre mí::

Volver arriba Ir abajo

Ultimate parallax control by:GDS [ace] Empty Re: Ultimate parallax control by:GDS [ace]

Mensaje por Gantzer49 Sáb 10 Nov 2012, 3:10 pm

muchas gracias me sirve muchisimo de verdad!, pero tengo una consulta, nosé si tu puedas ayudarme pero, los parallax siempre estan activos, hay algunos mapas en los que quiero desactivarlos y activarlos manualmente (en el juego, por ejemplo el parallax de las luces) y en el script creo que se puede, por donde empieza a decir (desde la linea 116)
# Switches/Interruptores y Variables
#
# Interruptores
#
# Activa o desactiva las capas de parallax
# si no lo vas a usar deja "nil"

y mas abajo sale esto

SWITCH_SKY = nil
SWITCH_LIGHT = nil
SWITCH_SHADOW = nil
SWITCH_GROUND = nil

VARIABLE_SKY = nil
VARIABLE_LIGHT = nil
VARIABLE_SHADOW = nil
VARIABLE_GROUND = nil

suponiendo que aqui el "nil" (de la parte "SWITCH_LIGHT" que quiero activar y desactivar en el juego) lo cambiaba por "on" o "off" para activarlos pero despues no me funciona el script y me salia error al entrar, y en realidad no puedo lograr como puedo activar y desactivar los parallax adentro del juego por algun interruptor, si puedes ayudarme o alguien que este ocupando este script y sepa de lo que hablo, me ayude por favor :P
Gantzer49
Gantzer49
0
0

Masculino

Edad 33

Cantidad de envíos 14

Maker Cash 25

Reputación 6


Volver arriba Ir abajo

Ultimate parallax control by:GDS [ace] Empty Re: Ultimate parallax control by:GDS [ace]

Mensaje por pigu_6 Sáb 10 Nov 2012, 7:22 pm

no probe como funcionaba con interruptores, dame un poco de tiempo y me fijo xq no tengo el maker en esta pc
pigu_6
pigu_6
300
300

Masculino

Edad 32

Cantidad de envíos 397

Maker Cash 714

Reputación 95


Extras
Sobre mí::

Volver arriba Ir abajo

Ultimate parallax control by:GDS [ace] Empty Re: Ultimate parallax control by:GDS [ace]

Mensaje por Maahkehro Dom 11 Nov 2012, 6:43 am

Gantzer, léete las normas. Has hecho un necropost, es decir, que has revivido tema (ha pasado más de un mes sin que nadie comentara). Como veo que no llevas mucho tiempo, no te subo el ban. Estate atento.
Maahkehro
Maahkehro
300
300

Masculino

Edad 26

Cantidad de envíos 431

Maker Cash 1888

Reputación 81


Extras
Sobre mí:: Si no me das +1 a mis aportes, saco mi Ametralladora lanza-cuchillos y me convierto en un Dios Oscuro come-hombres e.e

Volver arriba Ir abajo

Ultimate parallax control by:GDS [ace] Empty Pregunta

Mensaje por arellano Miér 08 Oct 2014, 8:28 pm

Intente usar este script pero cuando quiero iniciar el juego me sale un error

Script (Ultimate parallax) line170: NameError Ocurred.
undefined method  `create_parallax' for class `Spriteset_Map'
arellano
arellano
0
0

Masculino

Edad 27

Cantidad de envíos 3

Maker Cash 5

Reputación 0


Volver arriba Ir abajo

Ultimate parallax control by:GDS [ace] Empty Re: Ultimate parallax control by:GDS [ace]

Mensaje por Contenido patrocinado


Contenido patrocinado


Volver arriba Ir abajo

Volver arriba

- Temas similares

 
Permisos de este foro:
No puedes responder a temas en este foro.