LIGHT EFFECT XP V 3.1
Descrizione
Non è altro che uno script che implementa delle luci nel gioco
Autori
Near Fantastica (versione base)
skky88(v 3.1)
Allegati
file immagine da inserire nella cartella pitcures , si deve chiamare"LE"(scritto in maiuscolo senza virgolette)
LE.png 1,46K
130 Numero di downloads
Istruzioni per l'uso
Basta crare un evento nella mappa e scrivere come commento "FIRE" o "TORCH" o "TORCH2" o "LIGHT" o "LIGHT2" o "GROUND" e sull evento verrà applicata la luce in questione...queste si possono anche rendre invisibili con l'ausilio della switch n°1(è possibile cambiare il valore di questa switch);fire e torch non vengono disattivate dalla switch perchè a me servono cosi(ma cmq e possibile dissativare pure queste o le altre basta chiedere e ve lo modifico)
Spoiler
#================================
# ■ Light Effects XP V.3.1
#================================
# By: Near Fantastica
# Date: 28.06.05
# Version: 3
# modified by:SKKY88
# DATE: 05.08.09
#
#================================
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 = 5
light_effects.light.zoom_y = 5
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 = 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 == ["TORCH"]
type = "TORCH"
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 == ["TORCH2"]
type = "TORCH2"
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
end
end
for effect in @light_effects
case effect.type
when "GROUND"
effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 48
effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 48
effect.light.blend_type = 1
when "FIRE"
effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 146
effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 146
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 = (-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 "TORCH"
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.tone = Tone.new(255,-100,-255, 0)
effect.light.blend_type = 1
when "TORCH2"
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.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 = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 48
effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 48
when "FIRE"
effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 146
effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 146
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 = (-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 "TORCH"
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.opacity = rand(30) + 70
when "TORCH2"
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.opacity = rand(10) + 90
end
end
end
end
#================================
# ■ Light Effects Class
#================================
class Light_Effect
#--------------------------------------------------------------
attr_accessor :light
attr_accessor :event
attr_accessor :type
#--------------------------------------------------------------
def initialize(event, type)
@light = Sprite.new
@light.bitmap = RPG::Cache.picture("LE.PNG")
@light.visible = true
@light.z = 1000
@event = event
@type = type
end
end
Bugs e Conflitti Noti
N/A (o almeno fino ad ora)
Modificato da Apo, 14 marzo 2013 - 21:28 .























x2
x1




