example code, you will need to modify.
just edit and attach to the light entity.
to expand on what I mean, if you know the X/Y/Z coords where you want to move any entity not just lights, you just use SetPosition and SetRotation. you might want to try setting these as globals maybe. Depends on how you want to move your lights, ie. by using a key or some other way.
-light5position.LUA
--Position Entity 5 onto imported FPSC level map
local runitonce=0;
function light5position_init(e)
end
function light5position_main(e)
if runitonce==0 then
CollisionOff(e);
l_entx=g_levelxpos+1094.56164551;
l_enty=g_levelypos+857.5;
l_entz=g_levelzpos-603.99987793;
l_entrx=180;
l_entry=0;
l_entrz=0;
SetPosition(e,l_entx,l_enty,l_entz);
SetRotation(e,l_entrx,l_entry,l_entrz);
CollisionOn(e);
runitonce=1;
end
--[[
--TextCenterOnX(70,26,1,'[ENTITIES]');
--TextCenterOnX(70,29,1,'Entity obj #: '..g_Entity[e]['obj']);
--TextCenterOnX(70,32,1,'Entity x: '..g_Entity[e]['x']);
--TextCenterOnX(70,35,1,'Entity y: '..g_Entity[e]['y']);
--TextCenterOnX(70,38,1,'Entity z: '..g_Entity[e]['z']);
--]]
end
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, SQL, PL-SQL, JavaScript, HTML, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: SegAutoWelder, Entity+Weapon Welder