I am trying to get the lights to work on the map and they don't seem to react properly. I have DarkLIGHTS but I can't get that to work either. So I am asking for someone to help me figure this out. Thanks
SYNC ON
SYNC RATE 0
PHY START
LM START
HIDE MOUSE
AUTOCAM OFF
MAKE CAMERA 1
MAKE LIGHT 1
`set main constants
#CONSTANT playerobj = 1
#CONSTANT worldobj = 2
`set up the scene
POSITION CAMERA 1,-230,40,-239
LOAD IMAGE "media\AlgaeBricks.bmp",1
LOAD IMAGE "media\MarbleBlue.bmp",2
LOAD OBJECT "media\BasicMap.x",worldobj
POSITION OBJECT worldobj,0,0,0
`make a player object
MAKE OBJECT BOX playerobj,10,35,10
convert object fvf worldobj,(0x002 || 0x010 || 0x200)
set object normals worldobj
SET AMBIENT LIGHT 10
COLOR AMBIENT LIGHT RGB(10,10,10)
FOG ON
FOG DISTANCE 150
FOG COLOR 0,0,0
SET POINT LIGHT 1,-230,40,-239
COLOR LIGHT 1,255,0,0
SET LIGHT RANGE 1,100
`get camera angles for reference later
camx# = CAMERA ANGLE X(1)
camz# = CAMERA ANGLE Y(1)
ltx# = LIGHT DIRECTION X(1)
ltz# = LIGHT DIRECTION Y(1)
`this should set both objects up for collision using darkPHYSICS
`set world as terrain
PHY MAKE RIGID BODY STATIC TERRAIN worldobj
`sey character controller
PHY MAKE BOX CHARACTER CONTROLLER playerobj,CAMERA POSITION X(1),CAMERA POSITION Y(1),CAMERA POSITION Z(1),10,35,10,1,1.0,1.0
`main loop
Do
`used for player to look around
camy# = WRAPVALUE(MOUSEMOVEX() + camy#)
camx# = MOUSEMOVEY() + camx#
IF camx# > 90 THEN camx# = 90
IF camx# < -90 THEN camx# = -90
Rotate CAMERA 1, camx#,camy#,CAMERA ANGLE Z(1)
ROTATE OBJECT playerobj,camx#,camy#,OBJECT ANGLE Z(playerobj)
SET LIGHT TO OBJECT ORIENTATION 1,playerobj
SET LIGHT TO OBJECT POSITION 1, playerobj
PHY MOVE CHARACTER CONTROLLER playerobj,((MOUSECLICK()=1)-(MOUSECLICK()=2))*10
`re-position camera
POSITION CAMERA 1, OBJECT POSITION X(playerobj),OBJECT POSITION Y(playerobj),OBJECT POSITION Z(playerobj)
`update darkPHYSYICS
PHY UPDATE
SYNC
LOOP
END
LIFE: "That thing that happens to us when we are too young to die"
~V.J.C. 2003