you can reverse the order of events if you want.. this code posted here is old.. the way i do it now is have the light itself scan .. and have everyhitng else just have my.enable_scan=on; then the event should be triggered for the light ., not the model.. just change all the me to you...
so therfore the light model action should be the following:
ACTION lightobject
{
my.event=light_data;
MY.passable=ON;
MY.shadow=OFF;
my.enable_detect=on;
my.invisible=on;
scan_lights();
}
and the function light_data() should be this:
function light_data()
{
if event_type==event_detect
{
your.skill41=float(my.x);
your.skill42=float(my.z);
your.skill43=float(my.y);
}
}
everyting that has the material and is near the light should be lit. to adjust the light radius simple enlarge the scan radius in the scan_lights() function
make sure all the models that have the material have my.scan_enable set to on.
if you are using this material.. you'd best make everyhitng in world use it.. that wasy all the lighting will be coherent