Day/Night and Clear Lights with Clock

So no progress on moveable light sources?

Damn I really want to implement a flash light but using a picture as light won't make the area brighter since the script tints everything :/
:) There are other flash light systems :) also which RPG Maker are you using?
Rmxp

Sure there are flash light scripts I could even do it eventwise but this script darks the whole map so it wouldn't work.
I've been working to reduce the lag, and created a function to just refresh certain lights. I feel like it's much faster than before, but that could be just me. I'll be working on a dll to further reduce the lag too. Here's my version of the script.

  1.  
  2. =begin
  3. ---------------------------------------------
  4. DAY_NIGHT_LIGHT_SYSTEM
  5. ---------------------------------------------
  6. by
  7. - Brewmeister
  8. - Gubid
  9. - Star
  10. ---------------------------------------------
  11. =end
  12.  
  13.  
  14. #-----------------------------------
  15. # Editing of the Script
  16. #-----------------------------------
  17.  
  18.  
  19. # How many real time minutes does it take for a whole gameday to go by?
  20. # Normal time would be 24 minutes so a minute in game goes by every second.
  21. #-----------------------------------
  22. GAME_DAY_IN_REAL_MINUTES = 24
  23.  
  24.  
  25. # Current_Game_Day is the variable of the current day
  26. #-----------------------------------
  27. CURRENT_GAME_DAY = 15
  28.  
  29. # Day you want Game_Day to start at.
  30. #-----------------------------------
  31. INTIALIZE_GAME_DAY = 1
  32.  
  33.  
  34. # If Flickercolon is true the : in the 00:00 flashes every second
  35. #-----------------------------------
  36. FLICKERCOLON = true
  37.  
  38. # Hour_variable is the variable of the current hour
  39. #-----------------------------------
  40. HOUR_VARIABLE = 9
  41.  
  42. # Inside_Switch is the switch set to make insides darker, not meant for caves
  43. #-----------------------------------
  44. INSIDE_SWITCH = 9
  45.  
  46. # Inside_Opacity is the opacity set to increase when entering insides
  47. #-----------------------------------
  48. INSIDE_OPACITY = 10
  49.  
  50. # Cave_Switch is the switch set meant for caves
  51. #-----------------------------------
  52. CAVE_SWITCH = 11
  53.  
  54. # Cave_Opacity is the total opacity you want when entering caves.  Generally
  55. # Should be set higher than the highest darkness.
  56. #-----------------------------------
  57. CAVE_OPACITY = 220
  58.  
  59. # if AM_AND_PM is true, everything is not in military time
  60. #-----------------------------------
  61. AM_AND_PM = true
  62.  
  63. # Starthour is the hour the game starts at
  64. #-----------------------------------
  65. STARTHOUR = 2
  66.  
  67. # New_hour is the variable that changes the current hour.  You must use this in
  68. # order to change the hour.  It will not tell you the current hour, only
  69. # Hour_variable can tell the current hour.
  70. #-----------------------------------
  71. NEW_HOUR = 10
  72.  
  73. # Set this switch to on in order to hide the clock
  74. #-----------------------------------
  75. INVISIBLE_TIMER_SWITCH = 10
  76.  
  77. DEFAULT_RADIUS = 100
  78.  
  79.  
  80.  
  81. #---------------------------------------------
  82. #Bitmap
  83. #---------------------------------------------
  84. class Bitmap
  85.   def sub(ox,oy,light,lwidth)
  86.     tmp = Bitmap.new(lwidth, lwidth)
  87.     tmp.stretch_blt(tmp.rect, light, light.rect)
  88.     light = tmp.clone
  89.     ox -= (light.width / 2)
  90.     oy -= (light.height / 2)
  91.     for x in 0...light.width
  92.       for y in 0...light.height
  93.         lt_color = light.get_pixel(x,y)
  94.         ds_color = self.get_pixel(x + ox,y + oy)
  95.         ds_color.alpha -= lt_color.alpha
  96.         self.set_pixel(x + ox,y + oy,ds_color)
  97.       end
  98.     end
  99.   end
  100. end
  101.  
  102. #---------------------------------------------
  103. #end Bitmap
  104. #---------------------------------------------
  105.  
  106.  
  107. #---------------------------------------------
  108. #Game_System
  109. #---------------------------------------------
  110. class Game_System  
  111.   alias init_gme_sys initialize
  112.   def initialize
  113.     init_gme_sys
  114.     @timer_working = true
  115.     @timer_remember = 0
  116.     @timer = STARTHOUR * 2400
  117.   end
  118. def update
  119.     # reduce timer by 1
  120.     if @timer_working
  121.       if @timer > 57600
  122.         @timer = 0
  123.          $game_variables[CURRENT_GAME_DAY] += 1
  124.       else
  125.           if @timer_remember != 0 and @timer != @timer_remember
  126.           @timer = @timer_remember
  127.           @timer_remember = 0
  128.           else
  129.           @timer += (1 * (24/GAME_DAY_IN_REAL_MINUTES))
  130.           end
  131.       end
  132.     elsif @timer_remember != @timer and @timer_working == false
  133.       @timer_remember = @timer
  134.     end
  135.   end
  136. end
  137.  
  138. #---------------------------------------------
  139. #end Game_System
  140. #---------------------------------------------
  141.  
  142.  
  143.  
  144.  
  145. #---------------------------------------------
  146. #Sprite_Timer
  147. #---------------------------------------------
  148. class Sprite_Timer < Sprite
  149.   def initialize
  150.     super
  151.     self.bitmap = Bitmap.new(120, 20)
  152.     self.bitmap.font.name = "Arial"
  153.     self.bitmap.font.size = 15
  154.     self.x = 620 - self.bitmap.width
  155.     self.y = 0
  156.     self.z = 2000
  157.     @flicker = true
  158.     if $game_variables[CURRENT_GAME_DAY] < INTIALIZE_GAME_DAY
  159.       $game_variables[CURRENT_GAME_DAY] = INTIALIZE_GAME_DAY
  160.       end
  161.     update
  162.   end
  163.   def update
  164.     super
  165.     # Set timer to visible if working
  166.     if $game_switches[INVISIBLE_TIMER_SWITCH] == true
  167.     self.visible = false
  168.   else
  169.     self.visible = true
  170.     end
  171.         if $game_variables[NEW_HOUR] != 0 and
  172.            $game_variables[NEW_HOUR] != $game_variables[HOUR_VARIABLE]
  173.       $game_system.timer = $game_variables[NEW_HOUR] * 2400
  174.       if  $game_system.timer > 57600
  175.         $game_system.timer % 57600
  176.         $game_variables[CURRENT_GAME_DAY] += 1
  177.       end
  178.       $game_variables[NEW_HOUR] = 0
  179.       end
  180.     # If timer needs to be redrawn
  181.       if $game_system.timer / Graphics.frame_rate != @total_sec and $game_system.timer_working
  182.       # Clear window contents
  183.       self.bitmap.clear
  184.       # Calculate total number of seconds
  185.       @total_sec = $game_system.timer / Graphics.frame_rate
  186.       # Make a string for displaying the timer
  187.       case $game_variables[HOUR_VARIABLE]
  188.       when 0,1,2,3,4,5,18,19,20,21,22,23,24
  189.       moon_and_sun = RPG::Cache.picture("Moon")
  190.       cw = moon_and_sun.width
  191.       ch = moon_and_sun.height
  192.       rect = Rect.new(0, 0, cw, ch)
  193.       when 6,7,8,9,10,11,12,13,14,15,16,17
  194.       moon_and_sun = RPG::Cache.picture("Sun")
  195.       cw = moon_and_sun.width
  196.       ch = moon_and_sun.height
  197.       rect = Rect.new(0, 0, cw, ch)
  198.     end
  199.       if $game_variables[HOUR_VARIABLE] > 24
  200.       moon_and_sun = RPG::Cache.picture("Moon")
  201.       cw = moon_and_sun.width
  202.       ch = moon_and_sun.height
  203.       rect = Rect.new(0, 0, cw, ch)
  204.       end
  205.       if AM_AND_PM == true
  206.         if $game_variables[HOUR_VARIABLE] > 12
  207.           min = (@total_sec - 720) / 60
  208.           sec = @total_sec % 60
  209.         else
  210.           min = @total_sec / 60
  211.           sec = @total_sec % 60
  212.         end
  213.             if $game_variables[HOUR_VARIABLE] > 11 and $game_variables[HOUR_VARIABLE] != 24
  214.               setting = "PM"
  215.             else
  216.               setting = "AM"
  217.             end
  218.             if FLICKERCOLON == true and @flicker == false
  219.             text = sprintf("%02d %02d " + setting, min, sec)
  220.              @flicker = true
  221.           else
  222.             text = sprintf("%02d:%02d " + setting, min, sec)
  223.             if FLICKERCOLON == true
  224.               @flicker = false
  225.             end
  226.           end
  227.       else
  228.         min = @total_sec / 60
  229.         sec = @total_sec % 60
  230.         text = sprintf("%02d:%02d", min, sec)
  231.         end
  232.       if $game_variables[HOUR_VARIABLE] > 12 and AM_AND_PM == true
  233.       $game_variables[HOUR_VARIABLE] = min + 12
  234.       else
  235.       $game_variables[HOUR_VARIABLE] = min
  236.       end
  237.       $sec = sec
  238.       # Draw timer
  239.       rect2 = Rect.new(1, 1, 120, 20)
  240.       self.bitmap.font.color.set(0, 0, 0)
  241.       self.bitmap.draw_text(rect2, text, 1)
  242.       self.bitmap.font.color.set(255, 255, 255)
  243.       self.bitmap.draw_text(self.bitmap.rect, text, 1)
  244.       self.bitmap.blt(90, 0, moon_and_sun, rect)
  245.       end
  246.   end
  247. end
  248.  
  249. #---------------------------------------------
  250. #end Sprite_Timer
  251. #---------------------------------------------
  252.  
  253. #---------------------------------------------
  254. #Game_Event
  255. #---------------------------------------------
  256. class Game_Event < Game_Character
  257.   attr_reader :erased
  258.   attr_accessor :is_light
  259.   alias init_gm_evnt_lights initialize
  260.   def initialize(*args)
  261.     init_gm_evnt_lights(*args)
  262.     @is_light = false
  263.   end
  264.   alias refresh_gm_evnt_lights refresh
  265.   def refresh
  266.     tmp_page = @page
  267.     refresh_gm_evnt_lights
  268.     if tmp_page != @page
  269.       @is_light = false
  270.     end
  271.   end
  272. end
  273.  
  274. #---------------------------------------------
  275. #end Game_Event
  276. #---------------------------------------------
  277.  
  278. #---------------------------------------------
  279. #Sprite_Nighttime
  280. #---------------------------------------------
  281.  
  282. class Nighttime < Sprite
  283.   def initialize(x,y)
  284.     super()
  285.     @width = $game_map.width * 32
  286.     @height = $game_map.height * 32
  287.     @lights = {}
  288.     self.x = x
  289.     self.y = y
  290.     self.bitmap = Bitmap.new(@width, @height)
  291.     self.bitmap.clear
  292.     fillnight
  293.   end
  294.   def refresh
  295.     self.bitmap.clear
  296.     create_lights
  297.     fillnight
  298.   end
  299.  
  300.   def create_lights
  301.     if $game_switches[CAVE_SWITCH] == true
  302.       @lights[$game_player] = Light.new($game_player, DEFAULT_RADIUS)
  303.     elsif @lights[$game_player] != nil
  304.       @lights.delete($game_player)
  305.     end
  306.    
  307.     for event in $game_map.events.values
  308.       for i in 0...event.list.size
  309.         if event.list[i].code == 108 #comment
  310.           if event.erased and event.list[i].parameters[0].include?("light")
  311.             @lights.delete(event)
  312.             next
  313.           elsif event.list[i].parameters[0].include?("light")
  314.             size = event.list[i].parameters[0].delete("light").to_i #convert text to interger
  315.             @lights[event] = Light.new(event, size) unless @lights.keys.include?(event)
  316.             event.is_light = true
  317.             next
  318.           end
  319.         end
  320.       end
  321.       #in the event page is changed and it is no longer a light.. remove it.
  322.       if @lights[event] != nil and event.is_light == false
  323.         @lights.delete(event)
  324.        end
  325.     end
  326.   end
  327.   def fillnight
  328.     if $sec == nil
  329.       $sec = 0
  330.     end
  331.     if $game_switches[INSIDE_SWITCH] == true
  332.       extralpha = INSIDE_OPACITY
  333.     else
  334.       extralpha = 0
  335.       end
  336.      case $game_variables[HOUR_VARIABLE]
  337.     when 0, 1, 23
  338.     startop = 210 - extralpha
  339.     when 2
  340.     startop = 210 - ($sec / 2) + extralpha
  341.     when 3
  342.     startop = 180 - ($sec / 2) + extralpha
  343.     when 4
  344.     startop = 150 - ($sec / 2) + extralpha
  345.     when 5
  346.     startop = 120 - ($sec / 2) + extralpha
  347.     when 6
  348.     startop = 90 - ($sec / 2) + extralpha
  349.     when 7
  350.     startop = 60 - ($sec / 2) + extralpha
  351.     when 8
  352.     startop = 30 - ($sec / 2) + extralpha
  353.     when 9, 10, 11, 12, 13, 14, 15
  354.     startop = 0 + extralpha
  355.     when 16
  356.     startop = 0 + ($sec / 2) + extralpha
  357.     when 17
  358.     startop = 30 + ($sec / 2) + extralpha
  359.     when 18
  360.     startop = 60 + ($sec / 2) + extralpha
  361.     when 19
  362.     startop = 90 + ($sec / 2) + extralpha
  363.     when 20
  364.     startop = 120 + ($sec / 2) + extralpha
  365.     when 21
  366.     startop = 150 + ($sec / 2) + extralpha
  367.     when 22
  368.     startop = 180 + ($sec / 2) + extralpha
  369.   end
  370.   if $game_switches[CAVE_SWITCH] == true
  371.     startop = CAVE_OPACITY
  372.     end
  373.    
  374.     self.bitmap.fill_rect(0, 0, @width, @height, Color.new(0,0,0,255))
  375.     self.opacity = startop
  376.     # Now subtract out the lights
  377.     # Testing with a single light at tile 7,11
  378.     apply_lights
  379.   end
  380.   def apply_lights
  381.     applied_space = []
  382.     for light in @lights.values
  383.       image_sub = RPG::Cache.picture("LightSUB").clone
  384.       image_blt = RPG::Cache.picture("LightBLT").clone
  385.       base_rect = image_sub.rect
  386.       overlapLights = []
  387.       size = (light.size/100.0)
  388.       lwidth = base_rect.width*size
  389.       light_rect = Rect.new(light.x-(lwidth/2), light.y-(lwidth/2), lwidth, lwidth)
  390.       for applied_rect in applied_space
  391.         if light_rect.overlap?(applied_rect)
  392.           overlapLights << light_rect.area_in_overlap(applied_rect)
  393.         end
  394.       end
  395.       #now draw it
  396.       if overlapLights.size == 0 #no overlap detected.. then just BLT it into the image
  397.         self.bitmap.fill_rect(light_rect, Color.new(0,0,0,0))
  398.         self.bitmap.stretch_blt(light_rect, image_blt, base_rect)
  399.       else
  400.         self.bitmap.sub(light.x,light.y,image_sub,lwidth)
  401.       end
  402.       applied_space << light_rect
  403.       image_sub.dispose
  404.       image_blt.dispose
  405.     end
  406.     @applied_space = applied_space
  407.   end
  408.   def refresh_lights(lights)
  409.     for light in lights
  410.       image_sub = RPG::Cache.picture("LightSUB").clone
  411.       image_blt = RPG::Cache.picture("LightBLT").clone
  412.       base_rect = image_sub.rect
  413.       overlapLights = []
  414.       size = (light.size/100.0)
  415.       lwidth = base_rect.width*size
  416.       old_rect = Rect.new(light.old_x - lwidth / 2, light.old_y - lwidth / 2, lwidth, lwidth)
  417.       self.bitmap.fill_rect(old_rect, Color.new(0, 0, 0))
  418.       light_rect = Rect.new(light.x-(lwidth/2), light.y-(lwidth/2), lwidth, lwidth)
  419.       tmp = @applied_space.clone
  420.       obj = tmp.detect { |i| i == old_rect }
  421.       found = false
  422.       tmp.delete_if { |i|
  423.         break if found
  424.         found = i == old_rect
  425.       }
  426.       tmp.each { |applied_rect|
  427.         if light_rect.overlap?(applied_rect)
  428.           overlapLights << [old_rect.area_in_overlap(applied_rect), applied_rect]
  429.         end
  430.       }
  431.       tmp << light_rect
  432.       if overlapLights.size == 0 #no overlap detected.. then just BLT it into the image
  433.         self.bitmap.fill_rect(light_rect, Color.new(0,0,0,0))
  434.         self.bitmap.stretch_blt(light_rect, image_blt, base_rect)
  435.       else
  436.         overlapLights.each { |i|
  437.           real_bmap = Bitmap.new(i[1].width, i[1].width)
  438.           real_bmap.stretch_blt(real_bmap.rect, image_blt, base_rect)
  439.           x, y = 0, 0
  440.           if i[1].x < i[0].x
  441.             x = i[1].width - i[1].x + i[0].x
  442.           end
  443.           if i[1].y < i[0].y
  444.             y = i[1].height - i[1].y + i[0].y
  445.           end
  446.           self.bitmap.fill_rect(i[1], Color.new(0, 0, 0, 0))
  447.           self.bitmap.stretch_blt(i[1], image_blt, base_rect)
  448.         }
  449.         self.bitmap.sub(light.x,light.y,image_sub,lwidth)
  450.       end
  451.       @applied_space = tmp.clone
  452.     end
  453.   end
  454.   def update
  455.     if $game_switches[INSIDE_SWITCH] == true
  456.       extralpha = INSIDE_OPACITY
  457.     else
  458.       extralpha = 0
  459.       end
  460.     case $game_variables[HOUR_VARIABLE]
  461.     when 0, 1, 23
  462.     self.opacity = 210 - extralpha
  463.     when 2
  464.     self.opacity = 210 - ($sec / 2) + extralpha
  465.     when 3
  466.     self.opacity = 180 - ($sec / 2) + extralpha
  467.     when 4
  468.     self.opacity = 150 - ($sec / 2) + extralpha
  469.     when 5
  470.     self.opacity = 120 - ($sec / 2) + extralpha
  471.     when 6
  472.     self.opacity = 90 - ($sec / 2) + extralpha
  473.     when 7
  474.     self.opacity = 60 - ($sec / 2) + extralpha
  475.     when 8
  476.     self.opacity = 30 - ($sec / 2) + extralpha
  477.     when 9, 10, 11, 12, 13, 14, 15
  478.     self.opacity = 0 + extralpha
  479.     when 16
  480.     self.opacity = 0 + ($sec / 2) + extralpha
  481.     when 17
  482.     self.opacity = 30 + ($sec / 2) + extralpha
  483.     when 18
  484.     self.opacity = 60 + ($sec / 2) + extralpha
  485.     when 19
  486.     self.opacity = 90 + ($sec / 2) + extralpha
  487.     when 20
  488.     self.opacity = 120 + ($sec / 2) + extralpha
  489.     when 21
  490.     self.opacity = 150 + ($sec / 2) + extralpha
  491.     when 22
  492.     self.opacity = 180 + ($sec / 2) + extralpha
  493.     end
  494.     if $game_switches[CAVE_SWITCH] == true
  495.       startop = CAVE_OPACITY
  496.     end
  497.    
  498.     lights = []
  499.     @lights.each_value { |light|
  500.       if light.x != light.old_x or light.y != light.old_y
  501.         lights.push(light)
  502.       end
  503.     }
  504.    
  505.     refresh_lights(lights) if lights.length > 0
  506.     lights.each { |light|
  507.       light.old_x, light.old_y = light.x, light.y
  508.     }
  509.   end
  510. end
  511. class Rect
  512.   def overlap?(rect)
  513.     corners = []
  514.     corners << [rect.x, rect.y] #UL
  515.     corners << [rect.x+rect.width-1, rect.y] #UR
  516.     corners << [rect.x+rect.width-1, rect.y+rect.height-1] #LR
  517.     corners << [rect.x-1, rect.y+rect.height-1] #LL
  518.     for corner in corners
  519.       if corner[0].between?(self.x, self.x+width) and corner[1].between?(self.y, self.y+height)
  520.         return true
  521.       end
  522.     end
  523.     corners = []
  524.     corners << [self.x, self.y] #UL
  525.     corners << [self.x+self.width-1, self.y] #UR
  526.     corners << [self.x+self.width-1, self.y+self.height-1] #LR
  527.     corners << [self.x, self.y+self.height-1] #LL
  528.     for corner in corners
  529.       if corner[0].between?(rect.x, rect.x+width) and corner[1].between?(rect.y, rect.y+height)
  530.         return true
  531.       end
  532.     end
  533.     return false
  534.   end
  535.   def area_in_overlap(rect)
  536.     args = Array.new(4) { 0 }
  537.     # rect's corners
  538.     opos = [rect.x,rect.y,rect.x+rect.width-1,rect.y+rect.height-1]
  539.     # self's corners
  540.     spos = [self.x,self.y,self.x+self.width-1,self.y+self.height-1]
  541.     args[0] = [opos[0], spos[0]].max
  542.     args[1] = [opos[1], spos[1]].max
  543.     args[2] = [opos[2], spos[2]].min - args[0] + 1
  544.     args[3] = [opos[3], spos[3]].min - args[1] + 1
  545.     return Rect.new(*args)
  546.   end
  547.  
  548.   def equal?(rect)
  549.     return (x == rect.x and y == rect.y and width == rect.width and height == rect.height)
  550.   end
  551. end
  552.  
  553. class Light
  554.   attr_accessor :old_x, :old_y
  555.  
  556.   def initialize(event, size)
  557.     @event = event
  558.     @size = size
  559.     @old_x = self.x
  560.     @old_y = self.y
  561.   end
  562.   def size
  563.     return @size
  564.   end
  565.   def x
  566.     return @event.real_x/4 + 16
  567.   end
  568.   def y
  569.     return @event.real_y/4 + 16
  570.   end
  571. end
  572.  
  573.  
  574. #---------------------------------------------
  575. #end Sprite_Nighttime
  576. #---------------------------------------------
  577.  
  578. #---------------------------------------------
  579. #Spriteset_Map
  580. #---------------------------------------------
  581. class Spriteset_Map
  582.   alias init_spr_map_lights initialize
  583.   def initialize
  584.     # Make nighttime sprite
  585.     @nighttime = Nighttime.new(0,0)
  586.     @nighttime.z = 2000
  587.     init_spr_map_lights
  588.     @nighttime.refresh
  589.     @map_idd = $game_map.map_id
  590.   end
  591.   alias dns_dispose dispose
  592.   def dispose
  593.    dns_dispose
  594.    @nighttime.dispose
  595.   end
  596.   alias upd_spr_map_lights update
  597.   def update
  598.     upd_spr_map_lights
  599.     # Update nighttime sprite
  600.     @nighttime.ox = $game_map.display_x / 4
  601.     @nighttime.oy = $game_map.display_y / 4
  602.     if @hour_day != $game_variables[HOUR_VARIABLE]
  603.       $game_map.refresh
  604.       @hour_day = $game_variables[HOUR_VARIABLE]
  605.     end
  606.     if @map_idd != $game_map.map_id
  607.       @nighttime.refresh
  608.       @map_idd = $game_map.map_id
  609.     end
  610.     @nighttime.update
  611.   end
  612. end
  613. #---------------------------------------------
  614. #end Spriteset_Map
  615. #---------------------------------------------
  616.  
Expand to see the code.
Glad someone's still active in this project! I'll give it a test later. Good luck with that dll!
I get an error when I try your version thallion.

On line 307 Not method error.

undefined method 'size' for nil:NilClass

line:

  1. for i in 0...event.list.size
Expand to see the code.


Could be some other script conflicting no idea tough I really wish the version that let's the lights go away when you update their event page to work on my project but sadly it gives me errors :/

Only the one on the first page doesn't.
Actually, I just realized that my method was completely useless b/c I was testing it on a map with only one light. However, I finished the dll and it runs really fast on my computer w/261 Mg of ram.
I know it's been ages since anyone's worked on this, but I wanted to check on how that dll's going? Otherwise, I will probably start a new venture and script something up from scratch (after analyzing a lot of other lighting scripts, of course).
Hi there, first of all really really sorry for bumping a 3 year old topic but i need help with this topic. I'm a noob to RPGMAKER XP but that being said i have used other game engines and picked up the basics really fast in RPGMaker XP because of this.

The day/night cycle script that was been posted in this topic works fine but i have two little issues i can not seem to figure out. In the description it says;

Switches to make screen dark for caves and screens darker for houses

Setting the clock visible or invisible at start-up and by switch

I am unable to find any switches for these. I want it to always be dark in places like caves and to also completely hide the clock forever, i don't need the clock on-screen at all, however when i do what it says and set the switch to "on" (to hide the clock) i get a module error.

I downloaded the guys demo to see how he set things up but even the demo as no switches. So now am confused. I just need to switch i can toggle so i can make caves etc dark when needed and a switch for making the clock invisible or even help altering a value directly in the script to disable the clock showing on the hud.

Once again sorry for bumping such an old topic but this is what i need help with.

Thank you.
*edit*

I took a look at this script and due to the lack of support, popularity, and the low quality of this script, I decided to write my own Dynamic Lighting Script (with lights, Day / Night, and a clock) that addressed many of the issues, as well as adding a ton of new features.

Heretic's Dynamic Lighting Script [XP]
http://forum.chaos-project.com/index.php/topic,15417.msg194701.html#msg194701 (obsolete)

EDIT: Full Version 1.0 is available in my Collection
http://forum.chaos-project.com/index.ph ... 682.0.html

Image

Image

My script is still in development. Mostly dll work and I really only need some help with the C++ side of this (image quality), but you should be able to use this script for development in its current state. Due to some features not working the way I want just yet, I havent allowed legal distribution of the script at the time of this Post Edit (July 12th, 2016), but you can use and play with it. I will admit that the Demo for download listed above is not truly a proper demo as not all of the features are well explained or documented so some things may be a bit confusing.

If you need support for my script, have some time to work with C++ code for functionality that I need, please PM me or start a new thread. However, if you would like to compare both scripts, I believe this would be a more appropriate thread to post in.

---

*** original post prior to edit ***

@o0Sniper0o

Due to lack of support for this script, you might find an alternative here:
http://forum.chaos-project.com/index.ph ... 284.0.html

---

Edit: Monday, July 17th, 2017

Not sure how I forgot to update this post but my script is complete and released for legal distribution, including in commercial projects. The script I wrote is available in the link above in Heretic's Collection of Art and 100% Compatible Scripts. It is much faster, more stable, and has a TON of features that should knock your socks off!

Support for the original script of the OP should remain here, for support for my script, feel free to start a new thread so this thread remains dedicated to the script for which it was intended.

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=74494