MATERIAL* mtl_UV_alphaClamp =
{
event = mtl_UV_alphaClamp_event;
flags = ENABLE_RENDER;
effect =
"
float4x4 matMtl;
texture entSkin1;
technique uvspeed
{
pass p0
{
TexCoordIndex[0] = 0;
Texture[0] = <entSkin1>;
ColorArg1[0] = Texture;
AlphaArg1[0] = Texture;
ColorOp[0] = SelectArg1;
AlphaOp[0] = SelectArg1;
TexCoordIndex[1] = 0;
TextureTransform[1] = <matMtl>;
TextureTransformFlags[1] = Count2;
Texture[1] = <entSkin1>;
ColorArg1[1] = Texture;
AlphaArg1[1] = Current;
ColorOp[1] = SelectArg1;
AlphaOp[1] = SelectArg1;
ColorArg1[2] = Current;
ColorArg2[2] = Diffuse;
ColorOp[2] = Modulate;
}
}
";
}
function mtl_UV_alphaClamp_event()
{
mat_identity(mtl->matrix);
(mtl->matrix)[8] = (float)((my->skill)[1] / 256);
(mtl->matrix)[9] = (float)((my->skill)[2] / 256);
}
action bla ()
{
my->material = mtl_UV_alphaClamp;
while (1)
{
(my->skill)[1] += time_step;
(my->skill)[2] += time_step;
wait(1);
}
}