Hey, was wondering if anyone could take a look at this code and let me know why the light isn't showing up. The cube that I make is equally lit on all sides. Thanks.
//INITIALIZING EXTENDS
Null = ext initialized()
ShadNull = e3d initialized()
LightNull = l3d initialized()
MemNull = mbc initialized()
CamNull = cmr initialized()
autocam off
//spinning sword animation
sprite 018,512,367,018
offset sprite 018,109,112
animAngle = wrapvalue(animAngle)+1
rotate sprite 018,animAngle
//LOADING THE MESH
load image "media/section1/sand1.jpg",1000
mBox = b3d make object cube(20)
scale object mBox,2000,80,2000 : position object mBox,0,-100,0
texture object mBox,1000
sync
//LOADING SKYBOX
//CREATING LIGHTS
tesLight = l3d add virtual light(0,-50,0,100,255,0,255,2)
//LOADING THE MODELS AND SHADERS
//APPLYING SHADER
//CREATING THE CAMERA
Camera1000 = cmr make camera() : l3d set control camera Camera1000
l3d set visibility range 1024.0 : color backdrop Camera1000,0
sync
//the loading lifespan
loadingLife2 = 50
sync
while GameStatus = 4
//spinning sword animation
sprite 018,512,367,018
offset sprite 018,109,112
animAngle = wrapvalue(animAngle)+1
rotate sprite 018,animAngle
if loadingLife2 > 0 then loadingLife2 = loadingLife2 - 1
if loadingLife2 = 0 then GameStatus = 5
sync
endwhile
//cleaning up
delete sprite 018 : delete image 018
delete sprite 001 : delete image 001
//*****************
//SECTION 1
//*****************
while GameStatus = 5
Test = l3d display lights()
control camera using arrowkeys Camera1000,2,2
if keystate(36) = 1 then move object right 1000,1
sync
endwhile