Drew,

1. Make the two fx files

2. Save the light script as DynLight.wdl and set the behavior of a ball model with the light action. Set skill 1,2,3, to rgb -- I used 200 50 100 for example
Change player.x to camera.x

//DYNLIGHT.WDL:

var light_dist=2000; //this is how far away form a light it will be visible.
action light_pos_object
{
wait(5);
my.invisible=on;
my.passable=on;

while(1)
{

if vec_dist(my.x,camera.x)<light_dist
{

my.light=on;
my.lightrange=1000; //could be set also to a skill

my.red=my.skill1; //just put in the r,g,b values
my.green=my.skill2;
my.blue=my.skill3;

my.cast=on; //casts a shadow when on
}


else
{
my.lightrange=0; //if too far away turn it off
my.light=off;
my.cast=off;

}

wait(1);
}


}


3. Paste the material code at the end of main script. (didnt even put it inside main function, just tacked it onto the end) -- note my addition of VAR before d3dautomaterial like so:

//TACK ONTO END OF MAIN SCRIPT:

material spec_bump_model //assaign all models this material in script
{
flags = tangent;
}

var d3d_automaterial=1;
bmap your_world_texture_normalmap = <your_world_texture_normalmap.tga>;
material your_world_texture_normalmap_tga
{
skin1 = your_world_texture_normalmap;
flags = tangent;
}

//then call this function in main():

function load_shaders()
{
effect_load(spec_bump_model,"spec_bump_model.fx");

effect_load(your_world_texture_normalmap_tga,"spec_bump_world.fx");

wait(5);
}

Then I put in a couple of normal mapped models (which I used to use with your pointspeclight demo -- thanks for that by the way) and a couple of your crates -- one of which showed up partly transparent in the level... but I think the normal mapping works -- also add an image called yournormalmap.tga

Thats it.


I am only sure that this produces colored lights but it sure looks like the normalmap effect smooths the models ( I made low res versions of hires models, norrmal mapped them per your instructions...) I dont know how to apply textures to level blocks so I only use models.


Can someone tell me how to assign a normalmapped material to a model or object -- I usually use modified terrain multishaders for models -- is the "yournormalmap" texture applied from a WAD? How do I get the textures into the wads?