Le Deal du moment : -23%
EVGA SuperNOVA 650 G6 – Alimentation PC 100% ...
Voir le deal
77.91 €

Aller en bas
Mythendor
Mythendor
Membre

Nombre de messages : 50
Distinction : aucune
Date d'inscription : 14/02/2016

Résolu Script de Thomas Edison[Résolu]

Dim 12 Juin 2016 - 18:06
Bonjour à tous


J'ai un petit soucis avec le script de ce sujet: http://rpgmakervx.1fr1.net/t5997-effets-de-lumiere-correction-ajout?highlight=effet+de+lumi%E8re


Ca me met à chaque effet de lumière l'évènement en haut à gauche:

Script de Thomas Edison[Résolu] Ed1670d26b


J'ai essayé de voir le mode d'emploi inclus, mais j'ai pas l'impression d'avoir oublié quelque chose, quelqu'un a une idée?



Cordialement


Dernière édition par Mythendor le Dim 12 Juin 2016 - 19:08, édité 1 fois
Hermoni
Hermoni
Membre

Nombre de messages : 1042
Localisation : Quelque part entre la cuisine et le clavier.
Distinction : - Hermomo' le Chat. Noir et sarcastique mais chat tout de même é_è [Shamu' :3]
Poisson 2018 [Amal']
Rat de mon zoo sur le thème des rats [Ministre de la Culture]
Date d'inscription : 07/09/2015

Résolu Re: Script de Thomas Edison[Résolu]

Dim 12 Juin 2016 - 18:31
Montre le script directement ça sera plus simple pour voir qu'un lien vers un lien vers un lien (si j'oublie celui de la démo que j'ai pas vraiment envie de DL).^^
Mythendor
Mythendor
Membre

Nombre de messages : 50
Distinction : aucune
Date d'inscription : 14/02/2016

Résolu Re: Script de Thomas Edison[Résolu]

Dim 12 Juin 2016 - 18:37
Voilà le code:


Code:
=begin
                              Thomas Edison VX

Version: 0.1
Author: BulletXt (bulletxt@gmail.com)
Date: 12/06/2009
Script based upon Kylock's (http://www.rpgmakervx.net/index.php?showtopic=2432)


Description:
 To make an event glow, put a Comment inside event with one of the following
 light modes. When importing this script to a new project, be sure to copy
 Graphics/Pictures/le.png to your project.
 
Light Modes:
  
 GROUND - Medium steady white light.
 GROUND2 - Medium white light with slight flicker.
 GROUND3 - Small steady red light.
 GROUND4 - Medium steady green light.
 GROUND5 - Medium steady blu light.
 FIRE - Large red light with a slight flicker.
 LIGHT - Small steady white light.
 LIGHT2 - X-Large steady white light.
 LIGHT3 - Small white light with slight flicker.
 TORCH - X-Large red light with a heavy flicker.
 TORCH2 - X-Large red light with a sleight flicker.
 TORCH3 - Large white light with a slight flicker.

You can make a specific light type turn off/on by turning
one of the following switches id ON/off. By default, the switches are off so
the lights will show. Of course, turning all switches to ON will make all
light types go off.

=end

#id switch that if ON turns off FIRE mode lights
#applies only to light mode: FIRE
FIRE = 87
#id switch that if ON turns off LIGHT mode lights
#applies to light mode: LIGHT, LIGHT2, LIGHT3
LIGHT = 86
#id switch that if ON turns off GROUND mode lights
#applies to light mode: GROUND, GROUND2, GROUND3, GROUND4, GROUND5
GROUND = 85
#id switch that if ON turns off TORCH mode lights
#applies to light mode: TORCH, TORCH2, TORCH3
TORCH = 84


# this value can be true or false. If true, it enables compatibility with
# KGC_DayNight script. When it's night, lights will automatically go on, when
# morning comes back lights will go off. If you set this to true, be sure to
# place this script below KGC_DayNight script in the Scripting Editor of VX.
ENABLE_KGC_DAY_NIGHT_SCRIPT = true

=begin
This value must be exactly the same of "PHASE_VARIABLE" setting in KGC_DayNight
script. By default the script sets it to 11.
To make the event light go on/off with DayNight system, set the event page
to be triggered with this variable id and set it to be 1 or above.
=end
KGC_DAY_NIGHT_SCRIPT_VARIABLE = 11

=begin
Tips and tricks:
  You can't make a single specific light inside event go on/off if
  a condition applies, for example if a switch is ON.
  For the moment, you can achieve this by doing
  a script call immediatley after you make the condition apply.
  If for example the light event must go on if switch 100 is ON, after you turn
  on the switch do this call script:
  $scene = Scene_Map.new
  
  Be aware that doing this call script will make game freeze
  for 30 milliseconds.

################################################################################
=end


$bulletxt_day_check = 0

class Spriteset_Map
 
  alias bulletxt_spriteset_map_initalize initialize
 def initialize
 @light_effects = []
 initialize_lights
 bulletxt_spriteset_map_initalize
 update
 end

  alias bulletxt_spriteset_map_dispose dispose
 def dispose
 bulletxt_spriteset_map_dispose
 for effect in @light_effects
 effect.light.dispose
 end
 @light_effects = []
 end
 
  alias bulletxt_spriteset_map_update update
 def update
 bulletxt_spriteset_map_update
    check_day_night if ENABLE_KGC_DAY_NIGHT_SCRIPT
 update_light_effects
    
 end

  
  def check_day_night
    #if night
   if $bulletxt_day_check == 0
    if $game_variables[KGC_DAY_NIGHT_SCRIPT_VARIABLE] == 1
      $scene = Scene_Map.new
      $bulletxt_day_check = 1
  
    end
    
  else
    #if morning
    if $game_variables[KGC_DAY_NIGHT_SCRIPT_VARIABLE] == 3
      $game_variables[KGC_DAY_NIGHT_SCRIPT_VARIABLE] = -1
      $scene = Scene_Map.new
      $bulletxt_day_check = 0
    end
  end
  
    
    
  end
  
  
 def initialize_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 == ["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 == ["LIGHT3"]
 type = "LIGHT3"
 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 = 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 == ["TORCH3"]
 type = "TORCH3"
 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 == ["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 == ["GROUND2"]
 type = "GROUND2"
 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 == ["GROUND3"]
 type = "GROUND3"
 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 == ["GROUND4"]
 type = "GROUND4"
 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 == ["GROUND5"]
 type = "GROUND5"
 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
 end
 end
 
 for effect in @light_effects
 case effect.type
 
 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 "LIGHT3"
 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 = (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 "TORCH3"
 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.blend_type = 1
      
 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 "GROUND2"
 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 "GROUND3"
 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, 255)
 effect.light.blend_type = 1
 when "GROUND4"
 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, 100)
 effect.light.blend_type = 1
 when "GROUND5"
 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, 100)
 effect.light.blend_type = 1
 end
 end
end


def update_light_effects
################################################################################
  
  # handle FIRE
  if $game_switches[FIRE]
    for effect in @light_effects
      next if effect.type != "FIRE"
      effect.light.visible = false
    end
  else
    for effect in @light_effects
     next if effect.type != "FIRE"
      effect.light.visible = true
    end
  end

  # handle LIGHT
  if $game_switches[LIGHT]
    for effect in @light_effects
      next if effect.type != "LIGHT" && effect.type != "LIGHT2" && effect.type != "LIGHT3"
      effect.light.visible = false
    end
  else
    for effect in @light_effects
      next if effect.type != "LIGHT" && effect.type != "LIGHT2" && effect.type != "LIGHT3"
      effect.light.visible = true
    end
  end


  # handle GROUND
  if $game_switches[GROUND]
    for effect in @light_effects
      next if effect.type != "GROUND" && effect.type != "GROUND2" && effect.type != "GROUND3" && effect.type != "GROUND4" && effect.type != "GROUND5"
      effect.light.visible = false
    end
  else
    for effect in @light_effects
      next if effect.type != "GROUND" && effect.type != "GROUND2" && effect.type != "GROUND3" && effect.type != "GROUND4" && effect.type != "GROUND5"
      effect.light.visible = true
    end
  end


  # handle TORCH
  if $game_switches[TORCH]
    for effect in @light_effects
      next if effect.type != "TORCH" && effect.type != "TORCH2" && effect.type != "TORCH3"
      effect.light.visible = false
    end
  else
    for effect in @light_effects
      next if effect.type != "TORCH" && effect.type != "TORCH2" && effect.type != "TORCH3"
      effect.light.visible = true
    end
  end





################################################################################

 for effect in @light_effects
 case effect.type

 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 "LIGHT3"
 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
      
 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 "TORCH3"
 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 "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 "GROUND2"
 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.opacity = rand(10) + 90
 when "GROUND3"
 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 "GROUND4"
 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 "GROUND5"
 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

  #close def
 end
#close class
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


EDIT: A tout hasard, voici une version améliorée de ce script avec l'auteur du précédent:

Code:
 
=begin
                              Light Effects Version Ultime by CloudStrife
 
Version: 0.1
Author: BulletXt (bulletxt@gmail.com) Kylock and Cloudstrife
Date: 12/06/2009
Script based upon Kylock's (http://www.rpgmakervx.net/index.php?showtopic=2432)
 
 
Description:
 To make an event glow, put a Comment inside event with one of the following
 light modes. When importing this script to a new project, be sure to copy
 Graphics/Pictures/le.png to your project.
 
Light Modes:
 
 GROUND - Le moyen stabilise la lumière blanche.
 GROUND2 - Lumière blanche moyenne avec éclat léger.
 GROUND3 - Petite lumière rouge stable.
 GROUND4 - Le moyen stabilise le feu vert.
 GROUND5 - Le moyen stabilise la lumière de blue
 GROUND6- Le moyen stabilise la lumière de violet
GROUND7-Le moyen stabilise la lumière de jaune.
 
 FIRE - Lumière rouge, intensité forte
 LIGHT - Lumière standard, intensitée petite
# LIGHT2 - Lumière standard, intensitée moyenne
# LIGHT3 - Lumière standard, intensitée forte
 TORCH - X-Large lumière rouge avec un lourd éclat.
 TORCH2 - X-Large lumière rouge avec un éclat d'habileté.
 TORCH3 - Grande lumière blanche avec un éclat léger.
 TORCH4 - Lumière Rouge moyenne.
 
 # TORCH1B - Lumiére bleu, intesitée petite, ondule
# TORCH2B - Lumiére bleu, intesitée moyenne, ondule
# TORCH3B - Lumiére bleu, intesitée forte, ondule
# TORCH1V - Lumiére verte, intesitée petite, ondule
# TORCH2V - Lumiére verte, intesitée forte, ondule
# LIGHT1B - Lumière bleu, intensitée petite
# LIGHT2B - Lumière bleu, intensitée moyenne
# LIGHT1V - Lumière verte, intensitée petite
# LIGHT2V - Lumière verte, intensitée moyenne
# OMBRE - Lumière noir
 
Cette partie permet d'éteindre les lumières à l'aide des interrupteurs.
Chaque interrupteur permet d'éteindre un groupe de lumière comme les LIGHT par exemple
Vous pouvez changer l'ID de l'interrupteur comme bon vous sembles
Bref amusez-vous à éteindre/allumer les lumière de votre projet pour créer des scénes surpuissantes
Modification by CloudStrife (le faux
 
=end
 
#ID de l'interrupteur qui permet d'éteindre les lumières de mode de FIRE
#Ne marche seulement pour allumer et éteindre le mode : FIRE
FIRE = 87
#Pareil pour le mode LIGHT
#Eteins et allume les lumière avec les commentaires: LIGHT, LIGHT2, LIGHT3
LIGHT = 86
#On fini avec les GROUND
#Donc: GROUND, GROUND2, GROUND3, GROUND4, GROUND5
GROUND = 85
#Ma après les GROUND il reste les TORCH
#applies to light mode: TORCH, TORCH2, TORCH3 et les autres qui ne sont pas cités
TORCH = 84
 
 
# this value can be true or false. If true, it enables compatibility with
# KGC_DayNight script. When it's night, lights will automatically go on, when
# morning comes back lights will go off. If you set this to true, be sure to
# place this script below KGC_DayNight script in the Scripting Editor of VX.
ENABLE_KGC_DAY_NIGHT_SCRIPT = true
 
=begin
This value must be exactly the same of "PHASE_VARIABLE" setting in KGC_DayNight
script. By default the script sets it to 11.
To make the event light go on/off with DayNight system, set the event page
to be triggered with this variable id and set it to be 1 or above.
=end
KGC_DAY_NIGHT_SCRIPT_VARIABLE = 999
 
=begin
Tips and tricks:
  You can't make a single specific light inside event go on/off if
  a condition applies, for example if a switch is ON.
  For the moment, you can achieve this by doing
  a script call immediatley after you make the condition apply.
  If for example the light event must go on if switch 100 is ON, after you turn
  on the switch do this call script:
  $scene = Scene_Map.new
 
  Be aware that doing this call script will make game freeze
  for 30 milliseconds.
 
################################################################################
=end
 
 
$bulletxt_day_check = 0
 
class Spriteset_Map
 
  alias bulletxt_spriteset_map_initalize initialize
  def initialize
      @light_effects = []
      initialize_lights
      bulletxt_spriteset_map_initalize
      update
  end
 
  alias bulletxt_spriteset_map_dispose dispose
  def dispose
      bulletxt_spriteset_map_dispose
      for effect in @light_effects
        effect.light.dispose
      end
      @light_effects = []
  end
 
  alias bulletxt_spriteset_map_update update
  def update
      bulletxt_spriteset_map_update
    check_day_night if ENABLE_KGC_DAY_NIGHT_SCRIPT
      update_light_effects
 
  end
 
 
  def check_day_night
    #if night
  if $bulletxt_day_check == 0
    if $game_variables[KGC_DAY_NIGHT_SCRIPT_VARIABLE] == 1
      $scene = Scene_Map.new
      $bulletxt_day_check = 1
 
    end
 
  else
    #if morning
    if $game_variables[KGC_DAY_NIGHT_SCRIPT_VARIABLE] == 3
      $game_variables[KGC_DAY_NIGHT_SCRIPT_VARIABLE] = -1
      $scene = Scene_Map.new
      $bulletxt_day_check = 0
    end
  end
 
 
 
  end
 
 
  def initialize_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 == ["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 == ["LIGHT3"]
                  type = "LIGHT3"
                  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 = 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 == ["TORCH3"]
                  type = "TORCH3"
                  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 == ["TORCH4"]
                  type = "TORCH4"
                  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 == ["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 == ["GROUND2"]
                  type = "GROUND2"
                  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 == ["GROUND3"]
                  type = "GROUND3"
                  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 == ["GROUND4"]
                  type = "GROUND4"
                  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 == ["GROUND5"]
                  type = "GROUND5"
                  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 == ["GROUND6"]
                  type = "GROUND6"
                  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 == ["GROUND7"]
                  type = "GROUND7"
                  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 == ["TORCH1B"]
type = "TORCH1B"
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 == ["TORCH2B"]
type = "TORCH2B"
light_effects = Light_Effect.new(event,type)
light_effects.light.zoom_x = 3
light_effects.light.zoom_y = 3
light_effects.light.opacity = 150
@light_effects.push(light_effects)
end
 
if event.list[i].code == 108 and event.list[i].parameters == ["TORCH3B"]
type = "TORCH3B"
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 == ["TORCH1V"]
type = "TORCH1V"
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 == ["TORCH2V"]
type = "TORCH2V"
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 == ["TORCH1VIO"]
type = "TORCH1VIO"
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 == ["LIGHT1B"]
type = "LIGHT1B"
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 == ["LIGHT2B"]
type = "LIGHT2B"
light_effects = Light_Effect.new(event,type)
light_effects.light.zoom_x = 3
light_effects.light.zoom_y = 3
light_effects.light.opacity = 150
@light_effects.push(light_effects)
end
 
if event.list[i].code == 108 and event.list[i].parameters == ["LIGHT1V"]
type = "LIGHT1V"
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 == ["LIGHT2V"]
type = "LIGHT2V"
light_effects = Light_Effect.new(event,type)
light_effects.light.zoom_x = 3
light_effects.light.zoom_y = 3
light_effects.light.opacity = 150
@light_effects.push(light_effects)
end
if event.list[i].code == 108 and event.list[i].parameters == ["LIGHT2VV"]
type = "LIGHT2VV"
light_effects = Light_Effect.new(event,type)
light_effects.light.zoom_x = 3
light_effects.light.zoom_y = 3
light_effects.light.opacity = 150
@light_effects.push(light_effects)
end
if event.list[i].code == 108 and event.list[i].parameters == ["OMBRE"]
type = "OMBRE"
light_effects = Light_Effect.new(event,type)
light_effects.light.zoom_x = 3
light_effects.light.zoom_y = 3
light_effects.light.opacity = 150
@light_effects.push(light_effects)
end
end
end
for effect in @light_effects
      case effect.type
   
      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 "LIGHT3"
        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 = (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 "TORCH3"
        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.blend_type = 1
    when "TORCH4"
        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, 255)
        effect.light.blend_type = 1
 
      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 "GROUND2"
        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 "GROUND3"
        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, 255)
        effect.light.blend_type = 1
      when "GROUND4"
        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, 100)
        effect.light.blend_type = 1
      when "GROUND5"
        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, 100)
        effect.light.blend_type = 1
        when "GROUND6"
        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(85,-255,85, 255)
        effect.light.blend_type = 1
              when "GROUND7"
        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, 255)
        effect.light.blend_type = 1
     
        #"Tone" indique la couleur
 
when "TORCH1B"
effect.light.x = (effect.event.real_x - -10 - $game_map.display_x) / 8 - 20
effect.light.y = (effect.event.real_y - 100 - $game_map.display_y) / 8
effect.light.tone = Tone.new(-100,-60,200, 0)
effect.light.blend_type = 1
when "TORCH2B"
effect.light.x = (effect.event.real_x - 490 - $game_map.display_x) / 8 - 20
effect.light.y = (effect.event.real_y - 650 - $game_map.display_y) / 8
effect.light.tone = Tone.new(-100,-60,200, 0)
effect.light.blend_type = 1
when "TORCH3B"
effect.light.x = (effect.event.real_x - 1200 - $game_map.display_x) / 8 - 20
effect.light.y = (effect.event.real_y - 1400 - $game_map.display_y) / 8
effect.light.tone = Tone.new(-100,-60,200, 0)
effect.light.blend_type = 1
when "TORCH1V"
effect.light.x = (effect.event.real_x - -10 - $game_map.display_x) / 8 - 20
effect.light.y = (effect.event.real_y - 100 - $game_map.display_y) / 8
effect.light.tone = Tone.new(-100,100,-100, 0)
effect.light.blend_type = 1
when "TORCH2V"
effect.light.x = (effect.event.real_x - 1200 - $game_map.display_x) / 8 - 20
effect.light.y = (effect.event.real_y - 1400 - $game_map.display_y) / 8
effect.light.tone = Tone.new(-100,100,-100, 0)
effect.light.blend_type = 1
when "TORCH1VIO"
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(80,-100,80, 0)
effect.light.blend_type = 1
 
 
 
when "LIGHT1B"
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(-150,-150,300, 0)
effect.light.blend_type = 1
when "LIGHT2B"
effect.light.x = (effect.event.real_x - 490 - $game_map.display_x) / 8 - 20
effect.light.y = (effect.event.real_y - 650 - $game_map.display_y) / 8
effect.light.tone = Tone.new(-150,-150,300, 0)
 
effect.light.blend_type = 1
when "LIGHT1V"
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(-150,300,-150, 0)
effect.light.blend_type = 1
when "LIGHT2V"
effect.light.x = (effect.event.real_x - 490 - $game_map.display_x) / 8 - 20
effect.light.y = (effect.event.real_y - 650 - $game_map.display_y) / 8
effect.light.tone = Tone.new(-150,300,-100, 0)
effect.light.blend_type = 1
when "LIGHT2VV"
effect.light.x = (effect.event.real_x - 490 - $game_map.display_x) / 8 - 20
effect.light.y = (effect.event.real_y - 650 - $game_map.display_y) / 8
effect.light.tone = Tone.new(-150,300,10, 0)
effect.light.blend_type = 1
when "OMBRE"
effect.light.x = (effect.event.real_x - 490 - $game_map.display_x) / 8 - 20
effect.light.y = (effect.event.real_y - 650 - $game_map.display_y) / 8
effect.light.tone = Tone.new(-255,-255,-255, -255)
effect.light.blend_type = 1
 
      end
  end
end
 
 
def update_light_effects
################################################################################
 
  # handle FIRE
  if $game_switches[FIRE]
    for effect in @light_effects
      next if effect.type != "FIRE"
      effect.light.visible = false
    end
  else
    for effect in @light_effects
    next if effect.type != "FIRE"
      effect.light.visible = true
    end
  end
 
  # handle LIGHT
  if $game_switches[LIGHT]
    for effect in @light_effects
      next if effect.type != "LIGHT" && effect.type != "LIGHT2" && effect.type != "LIGHT3"
      effect.light.visible = false
    end
  else
    for effect in @light_effects
      next if effect.type != "LIGHT" && effect.type != "LIGHT2" && effect.type != "LIGHT3"
      effect.light.visible = true
    end
  end
 
 
  # handle GROUND
  if $game_switches[GROUND]
    for effect in @light_effects
      next if effect.type != "GROUND" && effect.type != "GROUND2" && effect.type != "GROUND3" && effect.type != "GROUND4" && effect.type != "GROUND5" && effect.type != "GROUND6" && effect.type != "GROUND7"
      effect.light.visible = false
    end
  else
    for effect in @light_effects
      next if effect.type != "GROUND" && effect.type != "GROUND2" && effect.type != "GROUND3" && effect.type != "GROUND4" && effect.type != "GROUND5" && effect.type != "GROUND6" && effect.type != "GROUND7"
      effect.light.visible = true
    end
  end
 
 
  # handle TORCH
  if $game_switches[TORCH]
    for effect in @light_effects
      next if effect.type != "TORCH" && effect.type != "TORCH2" && effect.type != "TORCH3"&& effect.type != "TORCH4"
      effect.light.visible = false
    end
  else
    for effect in @light_effects
      next if effect.type != "TORCH" && effect.type != "TORCH2" && effect.type != "TORCH3"&& effect.type != "TORCH4"
      effect.light.visible = true
    end
  end
 
  # handle TORCH
  if $game_switches[TORCH]
    for effect in @light_effects
      next if effect.type != "TORCH1B" && effect.type != "TORCH2B" && effect.type != "TORCH3B"&& effect.type != "TORCH1V"
      effect.light.visible = false
    end
  else
    for effect in @light_effects
      next if effect.type != "TORCH1B" && effect.type != "TORCH2B" && effect.type != "TORCH3B"&& effect.type != "TORCH1V"
      effect.light.visible = true
    end
  end
 
  # handle TORCH
  if $game_switches[TORCH]
    for effect in @light_effects
      next if effect.type != "TORCH2V" && effect.type != "LIGHT1B" && effect.type != "LIGHT2B"&& effect.type != "LIGHT1V"
      effect.light.visible = false
    end
  else
    for effect in @light_effects
      next if effect.type != "TORCH2V" && effect.type != "LIGHT1B" && effect.type != "LIGHT2B"&& effect.type != "LIGHT1V"
      effect.light.visible = true
    end
  end
 
  # handle TORCH
  if $game_switches[TORCH]
    for effect in @light_effects
      next if effect.type != "LIGHT2V" && effect.type != "OMBRE"
      effect.light.visible = false
    end
  else
    for effect in @light_effects
      next if effect.type != "LIGHT2V" && effect.type != "OMBRE"
      effect.light.visible = true
    end
  end
 
 
 
 
 
 
################################################################################
 
  for effect in @light_effects
      case effect.type
 
  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 "LIGHT3"
        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
 
  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 "TORCH3"
        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"TORCH4"
      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 "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 "GROUND2"
        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.opacity = rand(10) + 90
  when "GROUND3"
        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 "GROUND4"
        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 "GROUND5"
        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 "GROUND6"
        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 "GROUND7"
        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 "TORCH1B"
effect.light.x = (effect.event.real_x - -10 - $game_map.display_x) / 8 - 20 + rand(6) - 3
effect.light.y = (effect.event.real_y - 100 - $game_map.display_y) / 8 + rand(6) - 3
effect.light.opacity = rand(30) + 70
when "TORCH2B"
effect.light.x = (effect.event.real_x - 490 - $game_map.display_x) / 8 - 20 + rand(20) - 10
effect.light.y = (effect.event.real_y - 650 - $game_map.display_y) / 8 + rand(20) - 10
effect.light.opacity = rand(30) + 70
when "TORCH3B"
effect.light.x = (effect.event.real_x - 1200 - $game_map.display_x) / 8 - 20 + rand(20) - 10
effect.light.y = (effect.event.real_y - 1400 - $game_map.display_y) / 8 + rand(20) - 10
effect.light.opacity = rand(30) + 70
when "TORCH1V"
effect.light.x = (effect.event.real_x - -10 - $game_map.display_x) / 8 - 20 + rand(20) - 10
effect.light.y = (effect.event.real_y - 100 - $game_map.display_y) / 8 + rand(20) - 10
effect.light.opacity = rand(30) + 70
when "TORCH2V"
effect.light.x = (effect.event.real_x - 1200 - $game_map.display_x) / 8 - 20+ + rand(6) - 3
effect.light.y = (effect.event.real_y - 1400 - $game_map.display_y) / 8 + rand(6) - 3
effect.light.opacity = rand(30) + 70
when "TORCH1VIO"
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 "LIGHT1B"
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 "LIGHT2B"
effect.light.x = (effect.event.real_x - 490 - $game_map.display_x) / 8 - 20
effect.light.y = (effect.event.real_y - 650 - $game_map.display_y) / 8
when "LIGHT1V"
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 "LIGHT2V"
effect.light.x = (effect.event.real_x - 490 - $game_map.display_x) / 8 - 20
effect.light.y = (effect.event.real_y - 650 - $game_map.display_y) / 8
when "LIGHT2VV"
effect.light.x = (effect.event.real_x - 490 - $game_map.display_x) / 8 - 20
effect.light.y = (effect.event.real_y - 650 - $game_map.display_y) / 8
when "OMBRE"
effect.light.x = (effect.event.real_x - 490 - $game_map.display_x) / 8 - 20
effect.light.y = (effect.event.real_y - 650 - $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
 
Hermoni
Hermoni
Membre

Nombre de messages : 1042
Localisation : Quelque part entre la cuisine et le clavier.
Distinction : - Hermomo' le Chat. Noir et sarcastique mais chat tout de même é_è [Shamu' :3]
Poisson 2018 [Amal']
Rat de mon zoo sur le thème des rats [Ministre de la Culture]
Date d'inscription : 07/09/2015

Résolu Re: Script de Thomas Edison[Résolu]

Dim 12 Juin 2016 - 18:54
J'viens d'voir un truc, c'est un script pour VX, et t'es sur ACE.
Doit y avoir des différences pour que le positionnement ne fonctionne pas correctement mais là faut quelqu'un qui s'y connaisse un peu plus en script d'ace (j'pensais que c'était juste un soucis de configuration à la base).
Ou trouver une version faites pour ACE^^
Mythendor
Mythendor
Membre

Nombre de messages : 50
Distinction : aucune
Date d'inscription : 14/02/2016

Résolu Re: Script de Thomas Edison[Résolu]

Dim 12 Juin 2016 - 18:56
Bien merci, je vais essayer d'en trouver un pour Vx Ace, encore merci! Smile



EDIT: En voici un pour ceux qui auraient le même soucis que moi, même si j'ignore s'il y a mieux, personnellement, j'aimerai bien y rajouter le même effet que "FIREPIT", mais en bleu ou vert:

Code:
#==============================================================================
# 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:
# <a href="http://imageshack.us/photo/my-images/189/81598086.png/" target="_blank">http://imageshack.us/photo/my-images/189/81598086.png/</a>
#
# 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[LES::SWITCH]
                        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
#==============================================================================
Dany
Dany
Membre

Nombre de messages : 784
Age : 27
Distinction : aucune
Date d'inscription : 16/11/2010
http://gamers-studio.forumofficiel.fr/

Résolu Re: Script de Thomas Edison[Résolu]

Dim 12 Juin 2016 - 20:50
Salut regarde ce script.
C'est moi qui à rajouter des lumières: http://rpgmakervx.1fr1.net/t12212-autolight-ultimatum-system-v-2-3-6-sondage-terminer
Regarde si j'ai pas déjà fait.
Sinon je le rajoute si tu veux.
Contenu sponsorisé

Résolu Re: Script de Thomas Edison[Résolu]

Revenir en haut
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum