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

Light Effects VX 2.0

3 participantes

Ir abajo

Light Effects VX 2.0 Empty Light Effects VX 2.0

Mensaje por Mike_182 Lun 04 Jun 2012, 2:05 pm

Light Effects VX 2.0


Bueno, me fijaba en los scripts y no estaba este, asi que aqui lo tienen, digamos que es una actualizacion de este tema.
Antes que nada, pon esta imagen en Graphics->Pictures:
[Tienes que estar registrado y conectado para ver esa imagen]
Ponle el nombre de "Le.png" (sin comillas)
Copia y pega el script sobre Main:
Código:
#==============================================================================
#========================== Light Effects VX 2.0 ==============================
#------------------------------------------------------------------------------
#  Script de: Kylock (originalmente para RMXP por Near Fantastica)
#  Tradução por Equipe Gemstone
#  Novos modos de luz da versão 2.0 por Kbça
#==============================================================================
#  Para fazer com que um evento brilhe, escreva um Comentário: com qualquer um
#                dos modos de luz suportados abaixo.
#=============================== Versões ======================================
# 1.0 - Lançamento original
# 1.1 - Novos modos de luz adicionados: LIGHT2, TORCH, TORCH2.
#    - Mudou o modo de blend do sprite para Adicionar (parece um pouco melhor).
#    - Luzes de fogo agora estão com tonalidade vermelha.
# 2.0 - Novos modos de luz adicionados: (by Kbça)
#      XENON, BLOOD, GREEN, WHITE, CYAN, PINK e YELLOW
#============================= Modos de Luz ====================================
#  GROUND - Médio alcance e luz branca.
#  FIRE  - Luz vermelha que oscila levemente.
#  LIGHT  - Alcance curto e luz branca.
#  LIGHT2 - Longo alcance e luz branca.
#  TORCH  - Grande luz vermelha com muita oscilação.
#  TORCH2 - Grande luz vermelha que oscila levemente.
#  XENON  - Alcançe médio, luz azul imitando Xenon.
#  BLOOD  - Luz vermelho-sangue de alcançe médio, ideal para jogos de terror!
#  GREEN  - Luz verde de médio alcançe.
#  WHITE  - Luz branca de médio alcançe, porém mais forte que GROUND e LIGHT.
#  CYAN  - Alcançe médio, cor verde piscina e um tanto forte.
#  PINK  - Cor rosa, de médio alcançe.
#  YELLOW - Luz forte de médio alcançe de cor amarela.
#==============================================================================
# Altere aqui o ID do switch, se o switch esteja em ON os efeitos são desligados
Le_Switch = 13
#==============================================================================

class Spriteset_Map
  alias les_spriteset_map_initalize initialize
  alias les_spriteset_map_dispose dispose
  alias les_spriteset_map_update update
  def initialize
    @light_effects = []
    setup_lights
    les_spriteset_map_initalize
    update
  end
  def dispose
    les_spriteset_map_dispose
    for effect in @light_effects
      effect.light.dispose
    end
    @light_effects = []
  end
  def update
    les_spriteset_map_update
    update_light_effects
  end
  def setup_lights
    for event in $game_map.events.values
      next if event.list == nil
      for i in 0...event.list.size
        if event.list[i].code == 108 and event.list[i].parameters == ["GROUND"]
          type = "GROUND"
          light_effects = Light_Effect.new(event,type)
          light_effects.light.zoom_x = 2
          light_effects.light.zoom_y = 2
          light_effects.light.opacity = 100
          @light_effects.push(light_effects)
        end
        if event.list[i].code == 108 and event.list[i].parameters == ["FIRE"]
          type = "FIRE"
          light_effects = Light_Effect.new(event,type)
          light_effects.light.zoom_x = 300 / 100.0
          light_effects.light.zoom_y = 300 / 100.0
          light_effects.light.opacity = 100
          @light_effects.push(light_effects)
        end
        if event.list[i].code == 108 and event.list[i].parameters == ["LIGHT"]
          type = "LIGHT"
          light_effects = Light_Effect.new(event,type)
          light_effects.light.zoom_x = 1
          light_effects.light.zoom_y = 1
          light_effects.light.opacity = 150
          @light_effects.push(light_effects)
        end
        if event.list[i].code == 108 and event.list[i].parameters == ["LIGHT2"]
          type = "LIGHT2"
          light_effects = Light_Effect.new(event,type)
          light_effects.light.zoom_x = 6
          light_effects.light.zoom_y = 6
          light_effects.light.opacity = 150
          @light_effects.push(light_effects)
        end
        if event.list[i].code == 108 and event.list[i].parameters == ["TORCH"]
          type = "TORCH"
          light_effects = Light_Effect.new(event,type)
          light_effects.light.zoom_x = 6
          light_effects.light.zoom_y = 6
          light_effects.light.opacity = 150
          @light_effects.push(light_effects)
        end
        if event.list[i].code == 108 and event.list[i].parameters == ["TORCH2"]
          type = "TORCH2"
          light_effects = Light_Effect.new(event,type)
          light_effects.light.zoom_x = 6
          light_effects.light.zoom_y = 6
          light_effects.light.opacity = 150
          @light_effects.push(light_effects)
        end
        if event.list[i].code == 108 and event.list[i].parameters == ["XENON"]
          type = "XENON"
          light_effects = Light_Effect.new(event,type)
          light_effects.light.zoom_x = 2
          light_effects.light.zoom_y = 2
          light_effects.light.opacity = 150
          @light_effects.push(light_effects)
        end
        if event.list[i].code == 108 and event.list[i].parameters == ["BLOOD"]
          type = "BLOOD"
          light_effects = Light_Effect.new(event,type)
          light_effects.light.zoom_x = 2
          light_effects.light.zoom_y = 2
          light_effects.light.opacity = 150
          @light_effects.push(light_effects)
        end
        if event.list[i].code == 108 and event.list[i].parameters == ["GREEN"]
          type = "GREEN"
          light_effects = Light_Effect.new(event,type)
          light_effects.light.zoom_x = 2
          light_effects.light.zoom_y = 2
          light_effects.light.opacity = 150
          @light_effects.push(light_effects)
        end
        if event.list[i].code == 108 and event.list[i].parameters == ["WHITE"]
          type = "WHITE"
          light_effects = Light_Effect.new(event,type)
          light_effects.light.zoom_x = 2
          light_effects.light.zoom_y = 2
          light_effects.light.opacity = 180
          @light_effects.push(light_effects)
        end
        if event.list[i].code == 108 and event.list[i].parameters == ["CYAN"]
          type = "CYAN"
          light_effects = Light_Effect.new(event,type)
          light_effects.light.zoom_x = 2
          light_effects.light.zoom_y = 2
          light_effects.light.opacity = 180
          @light_effects.push(light_effects)
        end
        if event.list[i].code == 108 and event.list[i].parameters == ["PINK"]
          type = "PINK"
          light_effects = Light_Effect.new(event,type)
          light_effects.light.zoom_x = 2
          light_effects.light.zoom_y = 2
          light_effects.light.opacity = 180
          @light_effects.push(light_effects)
        end
        if event.list[i].code == 108 and event.list[i].parameters == ["YELLOW"]
          type = "YELLOW"
          light_effects = Light_Effect.new(event,type)
          light_effects.light.zoom_x = 2
          light_effects.light.zoom_y = 2
          light_effects.light.opacity = 180
          @light_effects.push(light_effects)
        end
      end
    end
    for effect in @light_effects
      case effect.type
      when "GROUND"
        effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
        effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
        effect.light.blend_type = 1
      when "FIRE"
        effect.light.x = (effect.event.real_x - 600 - $game_map.display_x) / 8 + rand(6) - 3
        effect.light.y = (effect.event.real_y - 600 - $game_map.display_y) / 8 + rand(6) - 3
        effect.light.tone = Tone.new(255,-100,-255,  0)
        effect.light.blend_type = 1
      when "LIGHT"
        effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 15
        effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 15
        effect.light.blend_type = 1
      when "LIGHT2"
        effect.light.x = (effect.event.real_x - 1200 - $game_map.display_x) / 8 - 20
        effect.light.y = (effect.event.real_y - 1200 - $game_map.display_y) / 8
        effect.light.blend_type = 1
      when "TORCH"
        effect.light.x = (effect.event.real_x - 1200 - $game_map.display_x) / 8 - 20
        effect.light.y = (effect.event.real_y - 1200 - $game_map.display_y) / 8
        effect.light.tone = Tone.new(255,-100,-255,  0)
        effect.light.blend_type = 1
      when "TORCH2"
        effect.light.x = (effect.event.real_x - 1200 - $game_map.display_x) / 8 - 20
        effect.light.y = (effect.event.real_y - 1200 - $game_map.display_y) / 8
        effect.light.tone = Tone.new(255,-100,-255,  0)
        effect.light.blend_type = 1
      when "XENON"
        effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
        effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
        effect.light.tone = Tone.new(-200,-200,255,  0)
        effect.light.blend_type = 1
      when "BLOOD"
        effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
        effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
        effect.light.tone = Tone.new(255,-230,-230,  0)
        effect.light.blend_type = 1
      when "GREEN"
        effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
        effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
        effect.light.tone = Tone.new(-150,255,-150,  0)
        effect.light.blend_type = 1
      when "WHITE"
        effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
        effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
        effect.light.tone = Tone.new(255,255,255,  0)
        effect.light.blend_type = 1
      when "CYAN"
        effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
        effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
        effect.light.tone = Tone.new(-255,0,0,  0)
        effect.light.blend_type = 1
      when "PINK"
        effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
        effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
        effect.light.tone = Tone.new(0,-255,0,  0)
        effect.light.blend_type = 1
      when "YELLOW"
        effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
        effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
        effect.light.tone = Tone.new(0,0,-255,  0)
        effect.light.blend_type = 1
      end
    end
  end
  def update_light_effects
    if $game_switches[Le_Switch]
      for effect in @light_effects
        next if effect.type == "FIRE" || effect.type == "TORCH"
        effect.light.visible = false
      end
    else
      for effect in @light_effects
        next if effect.type == "FIRE" || effect.type == "TORCH"
        effect.light.visible = true
      end
    end
    for effect in @light_effects
      case effect.type
      when "GROUND"
        effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
        effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
      when "FIRE"
        effect.light.x = (effect.event.real_x - 600 - $game_map.display_x) / 8 + rand(6) - 3
        effect.light.y = (effect.event.real_y - 600 - $game_map.display_y) / 8 + rand(6) - 3
        effect.light.opacity = rand(10) + 90
      when "LIGHT"
        effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 15
        effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 15
      when "LIGHT2"
        effect.light.x = (effect.event.real_x - 1200 - $game_map.display_x) / 8 - 20
        effect.light.y = (effect.event.real_y - 1200 - $game_map.display_y) / 8
      when "TORCH"
        effect.light.x = (effect.event.real_x - 1200 - $game_map.display_x) / 8 - 20 + rand(20) - 10
        effect.light.y = (effect.event.real_y - 1200 - $game_map.display_y) / 8 + rand(20) - 10
        effect.light.opacity = rand(30) + 70
      when "TORCH2"
        effect.light.x = (effect.event.real_x - 1200 - $game_map.display_x) / 8 - 20
        effect.light.y = (effect.event.real_y - 1200 - $game_map.display_y) / 8
        effect.light.opacity = rand(10) + 90
      when "XENON"
        effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
        effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
      when "BLOOD"
        effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
        effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
      when "GREEN"
        effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
        effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
      when "WHITE"
        effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
        effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
      when "CYAN"
        effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
        effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
      when "PINK"
        effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
        effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
      when "YELLOW"
        effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
        effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
      end
    end
  end
end

class Light_Effect
  attr_accessor :light
  attr_accessor :event
  attr_accessor :type
  def initialize(event, type)
    @light = Sprite.new
    @light.bitmap = Cache.picture("le.png")
    @light.visible = true
    @light.z = 1000
    @event = event
    @type = type
  end
end

Esta versión posee 13 diferentes opciones de iluminación:
GROUND - Luz blanca de medio alcance
FIRE - Luz roja suave que oscila ligeramente.
LIGHT - Luz blanca de corto alcance.
LIGHT2 - dLuz blanca de largo alcance.
TORCH - Luz roja grande con notoria de oscilación.
TORCH2 - Luz grande y roja que oscila ligeramente.
XENON - Llegar a la luz media de color azul imitando xenón.
BLOOD - Luz roja-sangre de alcance medio, ideal para juegos de terror!
GREEN - Luz verde de medio alcance.
WHITE - Luz blanca de medio alcance, pero más fuerte que GROUND y la LIGHT.
CYAN - Luz de color similar al turqueza un tanto fuerte.
PINK - Luz de color rosa, de medio alcance
YELLOW - Luz fuerte de medio alcance de color amarillo.

FIRE:
BLOOD:
WHITE:
Modo de uso:
Selecciona el evento que desea iluminar y selecciona en comandos de eventos "añadir un comentario" (la última opción en la primera columna de la primera página de los eventos)
En este comentario, escribe uno de los 13 comandos: Ejemplo: TORCH (ojo mayúsculas)
Espero y el script les sirva tanto como a mi.

Saludos !


Última edición por Mike_182 el Vie 08 Jun 2012, 10:46 pm, editado 2 veces
Mike_182
Mike_182
Super Moderador
Super Moderador

Masculino

Edad 28

Cantidad de envíos 814

Maker Cash 1041

Reputación 150


Extras
Sobre mí::

Volver arriba Ir abajo

Light Effects VX 2.0 Empty Re: Light Effects VX 2.0

Mensaje por Hero Zx Mar 05 Jun 2012, 4:12 pm

¿Alguna imagen para ver como se ve?
Hero Zx
Hero Zx
50
50

Masculino

Edad 30

Cantidad de envíos 70

Maker Cash 605

Reputación 1


Extras
Sobre mí:: http://gametev.wix.com/gametv

Volver arriba Ir abajo

Light Effects VX 2.0 Empty Re: Light Effects VX 2.0

Mensaje por Mike_182 Mar 05 Jun 2012, 4:26 pm

Pues para eso puse el link del otro tema, para que vieran la screen XD
Pues ahí esta, lo único que cambia es el color de las luces :PP, mucho mejor.

Saludos !
Mike_182
Mike_182
Super Moderador
Super Moderador

Masculino

Edad 28

Cantidad de envíos 814

Maker Cash 1041

Reputación 150


Extras
Sobre mí::

Volver arriba Ir abajo

Light Effects VX 2.0 Empty Re: Light Effects VX 2.0

Mensaje por krizalid00 Vie 08 Jun 2012, 8:36 pm

Muchas gracias Mike! Está genial el script, mucho más completo que el anterior.

doy +1 [Tienes que estar registrado y conectado para ver esa imagen]

saludos
krizalid00
krizalid00
50
50

Masculino

Edad 39

Cantidad de envíos 95

Maker Cash 606

Reputación 9


Volver arriba Ir abajo

Light Effects VX 2.0 Empty Re: Light Effects VX 2.0

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.