Hani2001 Posted August 13, 2018 Share Posted August 13, 2018 (edited) Please help me how to add anim for objects local function loadobj(resource) col178 = engineLoadCOL('Tube50mGlass1.col') txd178 = engineLoadTXD('MatTextures.txd') dff178 = engineLoadDFF('Tube50mGlass1.dff', 0) engineReplaceCOL(col178, 1833) engineImportTXD(txd178, 1833) engineReplaceModel(dff178, 1833) col901 = engineLoadCOL('AnimTube.col') txd901 = engineLoadTXD('MatTextures.txd') dff901 = engineLoadDFF('AnimTube.dff', 0) engineReplaceCOL(col901, 1858) engineImportTXD(txd901, 1858) engineReplaceModel(dff901, 1858) engineSetModelLODDistance(1833, 299) engineSetModelLODDistance(1858, 299) engineLoadIFP( "AnimTube.ifp", MatTextures ) end addEventHandler('onClientResourceStart', getResourceRootElement(getThisResource()), loadobj) How to add animation for MatTextures using engineReplaceAnimation ? Edited August 13, 2018 by Hani2001 Link to comment
JeViCo Posted August 13, 2018 Share Posted August 13, 2018 I think you can't. Like adding new objects it's impossible. For now. Anyway people represent moving objects with onClientRender/setTimer + setElementPosition; Moving/changing object textures with onClientRender/setTimer + dxSetShaderValue. Better then nothing i guess Link to comment
Discord Moderators Pirulax Posted August 13, 2018 Discord Moderators Share Posted August 13, 2018 Why would you do onClientRender/setTimer and dxSetShaderValue? Link to comment
JeViCo Posted August 14, 2018 Share Posted August 14, 2018 12 hours ago, Pirulax said: Why would you do onClientRender/setTimer and dxSetShaderValue? You can do lots of interesting stuff with it (It's not an advertisement. Really). Example: Link to comment
Discord Moderators Pirulax Posted August 14, 2018 Discord Moderators Share Posted August 14, 2018 (edited) I suppose this is a simple applied texture, so no need to set the value every time the texture updates because of the way it's done. Simply set the texture(with dxSetShaderValue) once and It'll work just fine. Added note on the wiki page too(DxSetShaderValue). Edited August 14, 2018 by Pirulax Just fixed a typo 1 Link to comment
JeViCo Posted August 14, 2018 Share Posted August 14, 2018 (edited) 24 minutes ago, Pirulax said: I suppose this is a simple applied texture, so no need to set the value every time the texture updates because of the way it's done. Simply set the texture(with dxSetShaderValue) once and It'll work just fine. Added note on the wiki page too(DxSetShaderValue). Yeah, you right. I added render target as texture so it changes automatically p.s. sorry for causing offtopic Edited August 14, 2018 by JeViCo Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now