You could determine the position of your "light object" and transfer it to the actual point light when the light object moves, something like this:
( MOVE PLAYER WITH ARROW KEYS )
// Project: PointLight
// Created: 23-05-21
#option_explicit
SetErrorMode(2)
#CONSTANT WIDTH GetMaxDeviceWidth()
#CONSTANT HEIGHT GetMaxDeviceHeight()
#CONSTANT cam 1
SetWindowSize ( WIDTH, HEIGHT , 1 )
SetVirtualResolution ( WIDTH, HEIGHT )
SetSyncRate ( 60, 1 )
UseNewDefaultFonts ( 1 )
// pointlight position
type LightType
x as float
y as float
z as float
endtype
global light as LightType
global plane as integer
global lightsphere as integer
global cube as integer
global cube2 as integer
global cone as integer
//cam
SetCameraPosition ( cam, 0, 10, -20 )
SetCameraLookAt ( cam, 0, 0, 0, 0 )
// dim surroundings
SetAmbientColor ( 20, 20, 20 )
SetSunActive ( 0 )
// hide mouse
SetRawMouseVisible ( 0 )
// create player and scene
plane = CreateObjectbox ( 15, .1, 15 )
SetObjectPosition ( plane, 0, -1, 0 )
SetObjectColor ( plane, 255, 255, 255, 255 )
SetObjectLightMode ( plane, 1 )
cube = CreateObjectBox ( 2, 2, 2 )
SetObjectPosition ( cube, 0, 0, 0 )
SetObjectColor ( cube, 255, 0, 255, 255 )
cube2 = CreateObjectBox ( 3, 3, 3 )
SetObjectPosition ( cube2, 3, 0, 3 )
SetObjectColor ( cube2, 215, 215, 215, 255 )
SetObjectLightMode ( cube2, 1 )
cone = CreateObjectcone ( 2, 2, 50 )
SetObjectPosition ( cone, 0, 2, 0 )
SetObjectColor ( cone, 0, 0, 255, 255 )
FixObjectToObject ( cone, cube )
lightsphere = CreateObjectSphere ( 1, 50, 50 )
SetObjectPosition ( lightsphere, 2, .5, 0 )
SetObjectColor ( lightsphere, 255, 0, 0, 255 )
FixObjectToObject ( lightsphere, cube )
SetObjectLightMode ( lightsphere, 0 )
// create pointlight
CreatePointLight ( 1, getobjectx(lightsphere), getobjecty(lightsphere), getobjectz(lightsphere), 5, 255, 0, 0)
SetPointLightMode ( 1, 1 )
repeat
// move player with ARROW keys
SetObjectPosition ( cube, GetObjectX ( cube ) + ( GetRawKeyState ( 39 ) - GetRawKeyState ( 37 ) ) * 0.1, 0, GetObjectZ ( cube ) + ( GetRawKeyState ( 38 ) - GetRawKeyState ( 40 ) ) * 0.1 )
// copy light sphere position to pointlight
light.x = GetObjectWorldX ( lightsphere )
light.y = GetObjectWorldY ( lightsphere )
light.z = GetObjectWorldZ ( lightsphere )
SetPointLightPosition ( 1, light.x, light.y, light.z )
Sync()
until GetRawKeyPressed ( 27 )
END
PSY