Hello
So i have work on it again, i have found the Engine3D function "LightAttenuation" know's here anyone how to use it in the Source?
My Source in the German Forum:
Code: Select all
InitEngine3D()
InitSprite()
InitKeyboard()
LoadFont(0,"Courier New",22)
Add3DArchive("\3D",#PB_3DArchive_FileSystem)
Parse3DScripts()
OpenScreen(1024,768,32,"Test")
LoadMesh(22,"Test.mesh")
CreateEntity(23,MeshID(22),#PB_Material_None ,0,0,-900)
CreateEntity(43,MeshID(22),#PB_Material_None ,0,-200,-900)
AmbientColor(RGB(0,0,0))
CreateLight(3,RGB(255,255,200),0,100,-900)
OpenLibrary(54,"Engine3D.dll")
; CallCFunction(54,"LightAttenuation",0,3)
CreateCamera(1,0,0,100,100)
CameraLocate(1,0,0,0)
If IsLight(3)
Else
MessageRequester("Fehler","Keine Lichter")
End
EndIf
Licht=-900
Repeat
CallCFunction(54,"LightLocate",3,0,100,Licht)
;LightLocate(3,0,100,Licht)
Licht=Licht--1
Delay(0)
ExamineKeyboard()
RenderWorld()
StartDrawing(ScreenOutput())
BackColor(RGB(0,0,0))
DrawText(20,20,"Position Licht:"+Str(Licht),RGB(255,255,255))
StopDrawing()
FlipBuffers()
Until KeyboardPushed(#PB_Key_Escape)
CloseLibrary(54)
RenderWorld()
FlipBuffers()
CloseScreen()
I have test here the Light Locate Commando but that works not... i have the desktop screen after the command CallCFunction and also the CallFunction...
With Greetings Ground0