I want to create a conveyor and i am using the "entity.u" property. That does not work!
In the manual: The pixel offsets of map entity textures, in horizontal and vertical direction. By changing these offsets in real time, effects like streaming water can be achieved. Note: this parameter is not used anymore in newer engine versions, but can be set as a workaround for the DirectX mesh animation bug (see bugs).
I wrote this code... "My.Skill1 = 1;" WROKS FINE! but when I wrote this code (if the speed of the computer varies).... "My.Skill1 = 10*Time;" THE TEXTURE OF THE CONVEYOR IS SHIVERING!
Is there a way to avoid this?
(I hope I have read all important notes this time )
function mtl_uvspeed_render() { // using the material matrix: // u' = u * mtl.matrix11 + v * mtl.matrix21 + mtl.matrix31; // v' = u * mtl.matrix12 + v * mtl.matrix22 + mtl.matrix32; mtl.matrix31 = floatd(my.skill1*total_ticks,256); mtl.matrix32 = floatd(my.skill2*total_ticks,256); }
function mtl_uvspeed_init() { // copy standard model material properties mtl_copy(mat_model); mat_identity(mtl.matrix); mtl.event = mtl_uvspeed_render; mtl.ENABLE_RENDER = on; }
//action: fx_uvspeed //title: Texture shifting in u and v direction // //skill1: Speed_U 0 //help: Texture Speed in U direction, default 0 //skill2: Speed_V -2 //help: Texture Speed in V direction, default -2 //desc: //desc: Shifts a texture in u and v direction. //desc: To be assigned to a model. // action fx_uvspeed() {