Yes.. i think i have got it like that. This is basically what happens in the effect:
Code:
function mtl_terr_view()
{
//SCALING THE TEXTURE
mtl.matrix11 = float(1.3);
mtl.matrix22 = float(1.3);
/// dISPLACE U (OR V);
mtl.matrix41 = mtl.skill1;
}
Code:
function mtl_terrer_init()
{
mtl.event = mtl_terr_view;
mtl.enable_render=on;
}
Code:
material terrer // environment cube
{
event=mtl_terrer_init();
skin1 = testsquares;
effect ="
texture entSkin1;
texture mtlSkin1;
matrix matMtl;
technique scalex {
pass p0
{
Texture[0]=<mtlSkin1>;
ColorArg1[0]=Texture;
ColorOp[0]=selectarg1;//addsmooth;//selectarg1;//add;
ColorArg2[0]=Diffuse;
AddressU[0]=wrap;
AddressV[0]=wrap;
TextureTransformFlags[0] = Count2; // use u,v values
TextureTransform[0] = <matMtl>;
}
}
";
}
And i have this line in the entities action:
terrer.skill1=my.skill3;
also tried this:
mtl.skill1=my.skill3;
Skill3 is different for all entities, but they still get the identical displacement of the texture. I can move it but it moves the same for every texture that uses it even though they all have different skill3 values.
I am stumped. I know i can use entity.u and .v to reach what im tryinmg to achieve but it gives me other problems.