lights

Blitz3D Forums/Blitz3D Beginners Area/lights

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

actually i think its the way i utilize the code, here

Function lights(entity)
LightMesh entity,-255,-255,-255
LightMesh entity,64,64,64
For l.light=Each light
If EntityVisible(l\entity,entity)=True Then ;l\visible#=1

l\r#=l\r#+10
l\b#=l\b#+10
l\g#=l\g#+10

Else
l\r#=l\r#-10
l\b#=l\b#-10
l\g#=l\g#-10
EndIf

If l\r#<0 Then l\r#=0
If l\g#<0 Then l\g#=0
If l\b#<0 Then l\b#=0

If l\r#>l\fr# Then l\r#=l\fr#
If l\g#>l\fg# Then l\g#=l\fg#
If l\b#>l\fb# Then l\b#=l\fb#

If l\r#>0 Or l\b#>0 Or l\g#>0 Then
TFormPoint 0,0,0,l\entity,entity
x#=TFormedX()
y#=TFormedY()
z#=TFormedZ()
LightMesh entity,l\r#,l\g#,l\b#,l\range#/10,x#,y#,z#
EndIf

Next
End Function