var/const
LIGHTLEVELDARK = rgb(null,null,null,200)
LIGHTLEVELMEDDARK = rgb(null,null,null,150)
LIGHTLEVELMED = rgb(null,null,null,100)
LIGHTLEVELMEDBRIGHT = rgb(null,null,null,50)
LIGHTLEVELBRIGHT = rgb(null,null,null,0)
obj/lighting_plane
screen_loc = "1,1"
plane = 2
blend_mode = BLEND_MULTIPLY
appearance_flags = PLANE_MASTER | NO_CLIENT_COLOR
color = list(null,null,null,null,LIGHTLEVELDARK)
mouse_opacity = 0
image/spotlight
plane = 2
blend_mode = BLEND_ADD
icon = 'spotlight.dmi' // a 96x96 white circle
pixel_x = -32
pixel_y = -32
This results in a purely dark exterior and a sudden change to a completely bright within the circle. So I tried to make a gradient radial type solution and the closest I could get was...
Code:
var/const
LIGHTLEVELDARK = rgb(null,null,null,200)
LIGHTLEVELMEDDARK = rgb(null,null,null,150)
LIGHTLEVELMED = rgb(null,null,null,100)
LIGHTLEVELMEDBRIGHT = rgb(null,null,null,50)
LIGHTLEVELBRIGHT = rgb(null,null,null,0)
obj/lighting_plane
screen_loc = "1,1"
plane = 2
blend_mode = BLEND_MULTIPLY
appearance_flags = PLANE_MASTER | NO_CLIENT_COLOR
color = list(null,null,null,null,LIGHTLEVELDARK)
mouse_opacity = 0
image/spotlight
plane = 3 //<------INSTEAD OF 2
blend_mode = BLEND_MULTIPLY // <----INSTEAD OF BLEND_ADD
icon = 'spotlight.dmi' // a 96x96 pattern of white circles with diff alpha
pixel_x = -32
pixel_y = -32
Now keep in mind! On this one 'spotlight.dmi' is a 96x96 full solid white background with a series of circles getting closer to fully alpha as it gets closer to the middle ending with alpha 1 because 0 goes back to completely dark.
This provides an almost better effect and is the only way I have found to make the light gradually stronger as it gets closer to the player but This does not seem to be the way most lighting is done and still has a little bit of darkness left over in even the brightest of area in the middle my next attempt will be to add a second spotlight on plane 4 with a blend_mode = BLEND_ADD to totally clean out the middle. Any suggestions before I proudly barbarian code my way to a result?