so basically a while back heedicalking quickly wrote up a piece of code for me that allowed me to change the player's light datablock. i changed it to the default orange light because its very good for a build my clan was doing. we used it for one of our projects, Red Block Redemption, and it seemed that the light would not work whenever the player would enter the main town or near other light sources (candles inside of the town's buildings).
now when SPO (my clan) is working on gravebreak, a zombie server, the light will not work whenever the slider for visible distance on the fog options is below a certain tick.
whenever i press the light key on my keyboard the light sound turning on and off happens except the light will not mount to my player's hand.
i've tested this with arix it turns out the light wont turn on for him as well, so it isnt a problem on my end.
don't blame heedicalking for being bad at coding, because he had to make this at a moment's notice in like 5 minutes.
package CustomLight
{
function serverCmdLight(%client)
{
%l = %client.player.light;
Parent::serverCmdLight(%client);
if(isObject(%client.player.light) && %client.player.light != %l)
{
%client.player.light.delete();
%light = new fxlight()
{
dataBlock = OrangeLight;
enable = true;
iconsize = 1;
player = %client.player;
};
%light.attachToObject(%client.player);
%client.player.light = %light;
}
}
};
activatePackage(CustomLight);