.:HyPeX:. Posted August 25, 2013 Share Posted August 25, 2013 Hello guys, Here today i got a very simple way of getting a billboard with a static image that moves (Yes it moves!, and it is noob-proof), using the UV-Scripted files from the wiki. Lets do it by steps. (I'm going to make it as i did on my map, Intervalia 2.) 1#: Download the "UV Scripted" Shader from the wiki.. https://wiki.multitheftauto.com/wiki/Shader_examples 2#: Unzip it and add it to your map folder: 3#: Edit meta and add the Lines requiered.. <script src="c_uv_scripted.lua" type="client" /> <file src="uv_scripted.fx" type="client" /> <file src="include/tex_matrix.fx" type="client" /> <file src="images/env3.bmp" type="client" /> 4#: Edit the image at "images" folder for the one you want! (NOTE: EDIT THE BMP FILE, AND IF U CHANGE IT, SAVE IT AS BMP and make sure is is the same name!) (I added this one in my case) <- Click for link 5#: Open the "c_uv_scripted.lua" file with notepad, or your preferred lua editor. Scroll down (or search) This lines: -- Create object with model 4729 (billboard) local x,y,z = getElementPosition( getLocalPlayer() ) createObject ( 4729, x-15, y, z+3 ) 6#: Replace them with the following lines: (Keep it open on those lines, dont close it!) -- Create object with model 4729 (billboard) createObject ( 4729, x, y, z, rx, ry, rz ) 7#: Go to your map and create a billboard (Model "4729") where you want to place it, and get its coords. (After getting them, delete the object.) 8#: Now go back to the lines we placed on step 6, and replace the "X Y Z" with the "X Y Z" Values from the position, and the "RX RY RZ" values from the rotation ones. Save and close the file. (Told you to keep it open!) In my case: 9#: Now profit! congratulations, it should have a pretty nice effect once you play the map. Hope it helps. Greetz HyPeX Link to comment
Akahmed Posted September 1, 2013 Share Posted September 1, 2013 thx using on my server! Link to comment
.:HyPeX:. Posted September 6, 2013 Author Share Posted September 6, 2013 Thanks Guys, i've put some hours of work on this tutorial. Btw, Thanks for the help of Hunterix, here you got an extra: Hello guys, if you want to add more shaders and make them global, just change these lines: (Note that you will have to add more lines with createObject) -- Apply to world texture engineApplyShaderToWorldTexture ( myShader, "bobo_2" ) -- Create object with model 4729 (billboard) createObject ( 4729, X, Y, Z, RX, RY, RZ ) With: -- Create object with model 4729 (billboard) createObject(4729, X, Y, Z, RX, RY, RZ ) -- Apply to world texture objectShader = createObject engineApplyShaderToWorldTexture ( myShader, "bobo_2",objectShader ) Link to comment
qaisjp Posted September 6, 2013 Share Posted September 6, 2013 This isn't a good tutorial, like I repeatedly say the tutorials need to be on the wiki and moderated. This is rather a set of instructions on how to use the current example resource and change the position of the billboard. Despicable. 1 Link to comment
TheTrue Posted January 7, 2017 Share Posted January 7, 2017 Good one, will use this... Link to comment
Recommended Posts