- MakeuseMembre
- Nombre de messages : 60
Localisation : Devant toi :3
Distinction : aucune
Date d'inscription : 15/11/2015
Script AUTOLIGHT 1.3.1
Dim 15 Nov 2015 - 14:56
Salut tout le monde,
j'ai un soucis avec le script connu sous le nom d' AUTOLIGHT 1.3.1. Normalement on crée un événement puis on met dans un commentaire soit "LIGHT 1" ; "FIREPIT" ; "LIGHT 2" ; "LIGHT 3" ; "TORCHLIT 1" ou encore "TORCHLIT 2". Quand j'ai crée un évènement avec pour commentaire l'une de ces formules et en déclenchement "touche action", sa ne ma strictement rien fait. La même chose avec un déclenchement "automatique" et là même le héros ne bouge plus (bug). Pas un seul effet de lumière ;( pourtant sa devrait marcher... Non ? S'il vous plait, Help...
Merci d'avance a celui qui aide <3
-Lesly-
Edit: C'est bon en fait. Dans les scripts, il faut penser à faire "inserer" au dessus de "Main" puis mettre le script dedans x)
j'ai un soucis avec le script connu sous le nom d' AUTOLIGHT 1.3.1. Normalement on crée un événement puis on met dans un commentaire soit "LIGHT 1" ; "FIREPIT" ; "LIGHT 2" ; "LIGHT 3" ; "TORCHLIT 1" ou encore "TORCHLIT 2". Quand j'ai crée un évènement avec pour commentaire l'une de ces formules et en déclenchement "touche action", sa ne ma strictement rien fait. La même chose avec un déclenchement "automatique" et là même le héros ne bouge plus (bug). Pas un seul effet de lumière ;( pourtant sa devrait marcher... Non ? S'il vous plait, Help...
- Script (long):
- #==============================================================================
# AUTOLIGHT 1.3.1 UNOFFICIAL PORTING VX ACE
# 12.27.2008
#------------------------------------------------------------------------------
# SCRIPT BY: Kylock
# PORTING BY: I don't want to be credited.
#
#==============================================================================
# INSTRUCTIONS
#
# Remember, you must have the file "le.png" in your "Graphics\Pictures" folder!
# If you're missing the file follow this link:
# https://2img.net/r/ihimg/photo/my-images/189/81598086.png/
#
# To make an event glow, choose the desired event and comment with the applied
# term. If you want Light 1, comment "LIGHT 1".
#==============================================================================
# ? Change Log
#------------------------------------------------------------------------------
# 1.0 - Original Release
# 1.1 - New light modes added: LIGHT2, TORCHLIT 1, TORCHLIT 2
# - Changed sprite blend mode to ADD
# - Fire-based lights are now red in color
# 1.2 - Bug fixed with looping maps and lights displaying above message boxes
# 1.3 - More bugfixes
#==============================================================================
# ? Light Modes
#------------------------------------------------------------------------------
#LIGHT 1 - Lumière blanche régulière. (Petit)
#FIREPIT - Scintillement.
#LIGHT 2 - Lumière blanche régulière. (Grand)
#LIGHT 3 - Lumière blanche régulière.
#TORCHLIT 1 - Scintillement. (Lourd)
#TORCHLIT 2 - Scintillement. (Lumière)
#==============================================================================
module LES
#The switch used to turn lights ON/OFF
#If the Switch is ON the lights turn OFF
#If the Switch is OFF the lights turn ON
SWITCH = 30
end
#==============================================================================
# ■ Spriteset_Map
#==============================================================================
class Spriteset_Map
alias les_spriteset_map_initalize initialize
def initialize
initialize_effects
les_spriteset_map_initalize
update
end
def initialize_effects
@light_effects = []
setup_lights
end
alias les_spriteset_map_dispose dispose
def dispose
les_spriteset_map_dispose
dispose_effects
end
def dispose_effects
for effect in @light_effects
effect.light.dispose
end
@light_effects = []
end
alias les_spriteset_map_update update
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 == ["LIGHT 1"]
type = "LIGHT 1"
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 == ["FIREPIT"]
type = "FIREPIT"
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 2"]
type = "LIGHT 2"
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 == ["LIGHT 3"]
type = "LIGHT 3"
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 == ["TORCHLIT 1"]
type = "TORCHLIT 1"
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 == ["TORCHLIT 2"]
type = "TORCHLIT 2"
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 "LIGHT 1"
effect.light.x = effect.event.screen_x - 64
effect.light.y = effect.event.screen_y - 86
effect.light.blend_type = 1
when "FIREPIT"
effect.light.x = effect.event.screen_x - 96 + rand(6) - 3
effect.light.y = effect.event.screen_y - 118 + rand(6) - 3
effect.light.tone = Tone.new(255,-100,-255, 0)
effect.light.blend_type = 1
when "LIGHT 2"
effect.light.x = effect.event.screen_x - 32
effect.light.y = effect.event.screen_y - 54
effect.light.blend_type = 1
when "LIGHT 3"
effect.light.x = effect.event.screen_x - 182 - 20
effect.light.y = effect.event.screen_y - 214
effect.light.blend_type = 1
when "TORCHLIT 1"
effect.light.x = effect.event.screen_x - 182 - 20 + rand(20) - 10
effect.light.y = effect.event.screen_y - 214 + rand(20) - 10
effect.light.tone = Tone.new(255,-100,-255, 0)
effect.light.blend_type = 1
when "TORCHLIT 2"
effect.light.x = effect.event.screen_x - 182 - 20
effect.light.y = effect.event.screen_y - 214
effect.light.tone = Tone.new(255,-100,-255, 0)
effect.light.blend_type = 1
end
end
end #def setup_lights
def update_light_effects
if $game_switches[LESSWITCH]
for effect in @light_effects
effect.light.visible = false
end
else
for effect in @light_effects
effect.light.visible = true
end
end
for effect in @light_effects
case effect.type
when "LIGHT 1"
effect.light.x = effect.event.screen_x - 64
effect.light.y = effect.event.screen_y - 86
when "FIREPIT"
effect.light.x = effect.event.screen_x - 96 + rand(6) - 3
effect.light.y = effect.event.screen_y - 118 + rand(6) - 3
effect.light.opacity = rand(10) + 90
when "LIGHT 2"
effect.light.x = effect.event.screen_x - 32
effect.light.y = effect.event.screen_y - 54
when "LIGHT 3"
effect.light.x = effect.event.screen_x - 182 - 20
effect.light.y = effect.event.screen_y - 214
when "TORCHLIT 1"
effect.light.x = effect.event.screen_x - 182 - 20 + rand(20) - 10
effect.light.y = effect.event.screen_y - 214 + rand(20) - 10
effect.light.opacity = rand(30) + 70
when "TORCHLIT 2"
effect.light.x = effect.event.screen_x - 182 - 20
effect.light.y = effect.event.screen_y - 214
effect.light.opacity = rand(10) + 90
end
end
end #def update_light_effects
end #class Spriteset_Map
#==============================================================================
# ■ Light_Effect
#==============================================================================
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 = 190
@event = event
@type = type
end
end #class Light_Effect
#==============================================================================
# ■ Scene_Map
#==============================================================================
class Scene_Map
alias les_pre_transfer pre_transfer
def pre_transfer
les_pre_transfer
@spriteset.dispose_effects
end
alias les_post_transfer post_transfer
def post_transfer
@spriteset.initialize_effects
les_post_transfer
end
end #Scene_Map
#==============================================================================
# END OF FILE
#==============================================================================
Merci d'avance a celui qui aide <3
-Lesly-
Edit: C'est bon en fait. Dans les scripts, il faut penser à faire "inserer" au dessus de "Main" puis mettre le script dedans x)
- [résolu]Modifier un script en appelant un script dans un evenement
- Probléme d'annulation de script lumière avec la portion de code stop script
- [script] Script de traduction pour l'evenement "afficher texte" de l'hiragana au latin ^^
- VXACE Script Gumps Class Based Level Bonus Script
- [SCRIPT] Aide pour script de quête s'il vous plaît
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum
|
|