RPG Maker Land
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

RPG Maker Land

O Novo mundo do RPG Maker!!
 
InícioPortalGaleriaÚltimas imagensProcurarRegistarEntrar
Entrar
Nome de usuário:
Senha:
Entrar automaticamente: 
:: Esqueci-me da senha
Últimos assuntos
» [RMVX] Sistema de Tempo + Spawner
Light System VX Icon_minitimeSáb Ago 04, 2012 3:26 pm por Édipo 13

» [RMVX] Aventuur
Light System VX Icon_minitimeSáb Ago 04, 2012 8:48 am por Édipo 13

» Blog Detonados e Downloads Massa!
Light System VX Icon_minitimeQua Jan 25, 2012 3:25 pm por Édipo 13

» [RMVX] O Templo
Light System VX Icon_minitimeQua Jan 11, 2012 8:11 am por Édipo 13

» [RPG Maker VX - Filme] Lara e a Caneta Cinza
Light System VX Icon_minitimeSeg Jan 09, 2012 9:19 am por Édipo 13

» [RPG Maker VX] Mario Kart RPG - Versão NOBug
Light System VX Icon_minitimeSáb Jan 07, 2012 11:31 am por Édipo 13

» Preciso de battler
Light System VX Icon_minitimeDom Abr 03, 2011 3:35 pm por bigglia

» [RPG Maker VX] Pescaria 3 - O Final
Light System VX Icon_minitimeDom Nov 21, 2010 9:20 am por Édipo 13

» [RPG Maker VX] Boy Scout
Light System VX Icon_minitimeDom Nov 21, 2010 9:19 am por Édipo 13

Parceiros da RMLand!
Light System VX Bannerpequenoly2

Light System VX Newbannerreb0

Light System VX Banner-2

Light System VX Pronpaganda

Light System VX Spoweredbytl5

Light System VX 66334844kk1


Visite Também
Light System VX Rmbbuttonch6 Light System VX Tudsobuttongo2

Light System VX Qquxzd

Light System VX 35kr81e

Banner da Land
Light System VX Banneratheronfk6

 

 Light System VX

Ir para baixo 
AutorMensagem
Atheron
ADMIN
ADMIN
Atheron


Número de Mensagens : 114
Reputação :
Light System VX Left_bar_bleue15 / 10015 / 100Light System VX Right_bar_bleue

Alerta :
Light System VX Left_bar_bleue0 / 1000 / 100Light System VX Right_bar_bleue

Perfil : Veja meu avatar: https://2img.net/r/ihimizer/img239/8997/gyunt8.png

Light System VX Empty
MensagemAssunto: Light System VX   Light System VX Icon_minitimeQui Dez 18, 2008 3:56 pm

@Atheron - Tirado da RPG Maker Brasil: http://www.rpgmakerbrasil.com/forum/f43/efeitos-de-luz-vx-10053.html


Efeitos de Luz VX
Por Kylock


.:Guia de Instalação:.

Basta instalar o script em Script Adicionais. Depois, para iluminar um evento, crie um comentário no mesmo, com o tipo de luz desejada (os tipos você pode ver no próprio código do script).
E você precisa do arquivo le.png. É a imagem no fim do tópico. Salve-a compo "le.png" na pasta Pictures de seu projeto.
Você pode configurar um Switch na linha 136 que liga/desliga alguns efeitos de luz. O script já tras, como SWITCH padrão, o SWITCH 1.


.:Script:.
Código:
# ■ Efeitos de Luz VX 1.1
#    5.21.2008
#------------------------------------------------------------------------------
#  Script por: Kylock  traduzido por: holocaust
#==============================================================================
#  Para fazer um evento brilhar, crie um Comentário, com as palavras
#  correspondentes a cada efeito de luz.
#  O SWITCH configurável na linha 136 desliga alguns efeitos de luz (LIGHT,
#  LIGHT2, TORCH e GROUND). Assim, você pode adaptar à sistemas de Dia/Noite.
#==============================================================================
# ● Tipos de Luz
#------------------------------------------------------------------------------
#  GROUND - Luz branca de tamanho médio.
#  FIRE  - Luz vermelha de tamanho médio, com efeito de fogo.
#  LIGHT  - Luz branca de tamanho pequeno.
#  LIGHT2 - Luz branca de tamanho grande.
#  TORCH  - Luz vermelha de tamanho grande, com efeito de fogo.
#  TORCH2 - Luz vermelha de tamanho grande, com leve efeito de fogo.
#==============================================================================

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
      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
      end
    end
  end
  def update_light_effects
    if $game_switches[1]
      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
      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

.:Créditos:.
Criado por: Kylock
Tradução e Demo por: Holocaust

.:Anexos:.
DEMO
Light System VX Lightls1
Ir para o topo Ir para baixo
https://rpgmakerland.forumeiro.com
 
Light System VX
Ir para o topo 
Página 1 de 1
 Tópicos semelhantes
-
» System 2K3

Permissões neste sub-fórumNão podes responder a tópicos
RPG Maker Land :: RGSS :: Scripts VX-
Ir para: