I am trying to spawn a working lamp like the ones in the tool section, any idea how to do this? I have tried the following code but it spawns a lamp that has the light effect if you look into it but it doesnt give out any light.
[code]
local lamp = ents.Create( "gmod_lamp" )
if ( !IsValid( lamp ) ) then return end
lamp:SetModel( "models/lamps/torch.mdl" )
lamp:SetFlashlightTexture( "models/effects/vol_light001" )
lamp:SetLightFOV( 70 )
lamp:SetColor( Color( 255, 255, 255, 255 ) )
lamp:SetDistance( 400 )
lamp:SetBrightness( 0.5 )
lamp:Switch( true )
lamp:SetToggle( true )
lamp:Spawn()
[/code]
EDIT:
Third time in a row I figure out the issue some minute after posting the thread.... The flashlight texture was the problem, changed it and it worked.
Sorry, you need to Log In to post a reply to this thread.